android-youtube-player v10.0.0 Release Notes
Release Date: 2019-02-11 // about 5 years ago-
โฌ๏ธ This is a major update, upgrading from an older version will break backward compatibility.
The code base has been rewritten in Kotlin and major improvements have been implemented throughout the library.Most notably, now
YouTubePlayerView
:- ๐ Supports custom attributes, to configure it directly from XML. It is now possible to play a video without writing a single line of Java/Kotlin code. For more advanced use cases everything can also be done programmatically, as before.
- ๐ Can manage its initialization internally!
YouTubePlayerInitListener
is a thing of the past, it has been removed from the code base. You can now directly add aYouTubePlayerListener
toYouTubePlayerView
. - ๐ป Can be easily used with the web-based UI instead of the native UI. When using the web-based UI it will be possible to click the "share" and "watch later" buttons that YouTube recently forced to be always visible.
The documentation has been greatly improved, please use it and feel free to contribute :)
Follows a detailed description of the changes.
๐ฅ Breaking changes:
- ๐
YouTubePlayerInitListener
has been removed. - Every method of
YouTubePlayerListener
now takes aYouTubePlayer
as first argument. - ๐ Useless parameters have been removed from
IFramePlayerOptions
, such asautoplay
,origin
,showInfo
andmodestBranding
. They are deprecated on the IFrame player or not working on mobile devices. - ๐ The class
androidyoutubeplayer.utils.Callable
has been removed. - ๐ The method
setYouTubePlayerMenu
has been removed fromPlayerUIController
. - ๐ฆ The content of the
core
module is now under acore
package.
๐ New features:
- ๐
YouTubePlayerView
supports xml attributes, check out the documentation to learn more. - 0๏ธโฃ It is possible to let
YouTubePlayerView
initialize itself by using the attributeenableAutomaticInitialization
, which isture
by default. - ๐ป It is now possible to easily replace the native UI of the player with the web-based UI. This makes it possible to click the "share" and "watch later" buttons.
- ๐ A set of components are now available to help you build custom UIs, such as
YouTubePlayerSeekBar
andFadeViewHelper
, read the documentation to know more.
๐ Improvements:
- The core module has been rewritten in Kotlin. This doesn't break its compatibility with Java, it just improves the code base.
YouTubePlayerView
has a newgetYouTubePlayerWhenReady
method.- ๐ The utility
cueOrLoadVideo
has been added, read the documentation to know more. PlayerUIController
now has a fluent interfaceYouTubePlayerMenu
now has a fluent interface- The dependencies of both the
core
andchromecast-sender
modules have been reorganized in order to import only what's needed. - Private resources of the library have been renamed with the "ayt_" prefix.
- The sample apps have been reorganized and improved with new examples.
- Both sample apps are now built on top of library-sample-app-template.
๐ Bugfixes: