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? I can't find anything in the docs.

Thanks.

Answers


Add the style YouTubePlayer.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.


Yes You can disable full screen from default player,You need to just use below code with your player object.

//To disable full screen mode.
player.setShowFullscreenButton(false);

Use above line to hide full screen button from your default youtube player.Hope this will work for you.


Need Your Help

Jasmine-node - Creating a spy on a constructor called inside other function

javascript node.js jasmine-node spy

I'm novice in jasmine and I need to write some unit tests for node.js app in this framework.

How do I bring 1 of 3 movie clips to the front and make it stay there? (Flash CS5, AS 3.0)

actionscript-3 actionscript flash-cs5 movieclip

I have three movie clips that I want to bring to front when I click on the associated tag. Flash cs5 and actionscript 3.0. The coding for each looks like this: