Android Youtube SDK - Know when first frame is loaded -


I want to show a loading screen while launching the YouTube player, but hide this screen when the first frame of the video Loaded and shown to the user.

The reason for this is that if I remove the screen on initialization, then there are few seconds that the player is black. After that the player loads the first frame or video image poster, and shows the play button. If possible, I can trace the scenario. Thank you.

is a YouTubePlayer. PlayStorage Change Listener Interface You Can Listen for This Purpose

  player.setPlayerStateChangeListener (New YouTubePlayer.PlayerStateChangeListener) {@Override Video Starred on Public Zero () {} Loading on the Public Zero at Public Zero () {} @ Override Public Loading on Zero () {} Loaded (string entry) {} @} override public wide on error (error zone RGR) {} @ override at public space vacant () {}};  

Onloaded tells that the video has finally been loaded, so this is the moment where the play button and video posters appear on the screen


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -