how to show loading when buffering stream video?

59 views
Skip to first unread message

vandin...@gmail.com

unread,
Jan 29, 2014, 12:29:49 AM1/29/14
to codenameone...@googlegroups.com
I use media in codenameone to play video from link, I want to show loading icon indicate buffering stream and playing icon loading will be dispose.
Please help me. Thanks

Shai Almog

unread,
Jan 29, 2014, 1:26:51 AM1/29/14
to codenameone...@googlegroups.com, vandin...@gmail.com
isPlaying() should return false during buffering so you should be able to use that to detect buffering. I've tested this for audio though, not for video.
Message has been deleted

vandin...@gmail.com

unread,
Jan 29, 2014, 2:51:36 AM1/29/14
to codenameone...@googlegroups.com, vandin...@gmail.com
Thanks Shai

I will try timer and isPlaying() to detect buffering, but I want use InfiniteProgress to show icon loading, can you say how to fix InfiniteProgress on container of player, because my player not fullscreen. Thanks.

Shai Almog

unread,
Jan 29, 2014, 12:43:05 PM1/29/14
to codenameone...@googlegroups.com, vandin...@gmail.com
This will not work since the player is native and resides in a different layer. You can place an infinite progress as a component below or above it.

basnet...@gmail.com

unread,
Nov 26, 2015, 12:13:46 AM11/26/15
to CodenameOne Discussions, vandin...@gmail.com, Aayushma Nepal


On Wednesday, January 29, 2014 at 12:11:51 PM UTC+5:45, Shai Almog wrote:
isPlaying() should return false during buffering so you should be able to use that to detect buffering. I've tested this for audio though, not for video.


But isPlaying() also returns false when pause button is pressed resulting the infinite progress to appear. So how to show InfiniteProgress only when buffering but not when pause button is pressed? 

Shai Almog

unread,
Nov 26, 2015, 1:16:22 AM11/26/15
to CodenameOne Discussions, vandin...@gmail.com, aab...@gmail.com, basnet...@gmail.com
That's unrelated. The media paused or otherwise is still rendered natively on a separate thread.

FYI http://stackoverflow.com/questions/33931588/why-doesnt-my-component-appear-on-top-of-the-html-page-or-media-player-in-coden/33931589#33931589
Reply all
Reply to author
Forward
0 new messages