-
It is now possible to set a completely custom UI on the player.
By calling YouTubePlayerView's methodView inflateCustomPlayerUI(@LayoutRes int customPlayerUILayoutID).
This method takes as argument the ID of a layout resource. This layout will completely replace the default UI of the player.
After replacing the UI you won't be able to use the default UI controller (getPlayerUIController()), it will be necessary to handle the new UI externally, in your own app.
A complete example can be seen here.
You can read more here. -
Removed
getCurrentState()method from YouTubePlayer.
This method was adding useless noise to the API, therefore it has been removed.
A simple utility class has been added to the library in order to provide the same functionality:YouTubePlayerStateTracker. You can read more here. -
If YouTubePlayerView is added as a lifecycle observer, it will automatically pause when the Activity/Fragment is paused.
If you want it to keep playing even when the Activity/Fragment is pause, just don't register it as a lifecycle observer. But remember to manually callrelease()when the Activity/Fragment is destroyed. -
Brand new sample app
-
Sample app published on PlayStore