Reputation: 6369
I am using YouTubePlayerFragment from YouTube Android Player API. I want to customize UI. Particularly hide video title at top left and hide YouTube logo at bottom right, but keep all other controls. Is there any way I can do this. MINIMAL and CHROMLESS style is not an option since I want to have seekbar and options menu for this player.
Upvotes: 2
Views: 3074
Reputation: 1738
you can't do that using the YouTube Player API. To overcome the issue of limited customization options (among other issues) I've built an opensource player to replace the one from Google. Android-YouTube-Player.
To hide part of the UI you can simply do this
PlayerUIController uiController = youTubePlayerView.getPlayerUIController();
uiController.showVideoTitle(false);
uiController.showYouTubeButton(false);
You can customize the UI even further, the library has an API to replace the default UI with whatever View you want.
View customPlayerUI = YouTubePlayerView.inflateCustomPlayerUI(R.layout.custom_player_ui);
You can read more about it here.
Upvotes: 2