Removing Elements From Within The Youtubeplayerview In Android
My YouTube video shows an overflow menu, full screen, open in YouTube buttons from within the YouTubePlayerView or the YouTubePlayerFragment. Is there any way to remove those items
Solution 1:
Add the styleYouTubePlayer.PlayerStyle.CHROMELESS
in initialization to completely remove all available controls.
In onInitializationSuccess
add ytPlayer.setPlayerStyle(YouTubePlayer.PlayerStyle.CHROMELESS);
.
Check here for more details.
Edit : You can add your own controls using either a DialogFragment or Dialog on top of the YoutubePlayer. This will allow you to control playback completely using your own buttons and seekbar. And it does the trick of removing Youtube App Button from player.
Post a Comment for "Removing Elements From Within The Youtubeplayerview In Android"