- #ANDROID VIDEO PLAYER WITH CHROMECAST APK#
- #ANDROID VIDEO PLAYER WITH CHROMECAST INSTALL#
- #ANDROID VIDEO PLAYER WITH CHROMECAST ANDROID#
If set, the player will automatically start playing the video.
This attribute expects a String, which is the id of a YouTube video. Everything can also be done programmatically. If you add the view to your XML layout you have the possibility to set a few custom attributes, to customize the view's look and behavior. If the height of the View is set to wrap_content, the View will automatically have an aspect ratio of 16:9, to match the aspect ratio of most YouTube videos. YouTubePlayerView youTubePlayerView = new YouTubePlayerView( this)
It's all you need to play YouTube videos in your app.Īdd this to your module level adle file. The core module contains the YouTube Player. The minimum API level supported by this library is API 17. The Gradle dependency is available via MavenCentral. ? If you want to know when a new release of the library is published: watch this repository on GitHub.
#ANDROID VIDEO PLAYER WITH CHROMECAST APK#
#ANDROID VIDEO PLAYER WITH CHROMECAST INSTALL#
? You can also download and install the apks of both sample apps. Go to source code of chromecast-sender sample app.? Both the core module and the chromecast module have a sample app, to provide examples of usage of the libraries. This is issue has nothing to do with the library itself, but I figured it may be useful knowledge for many of you considering to use it. If you follow the instructions in the documentation, the library will automatically handle this for you.Īlso remember when publishing your app on the PlayStore to write title and description in a way that makes it obvious that your app doesn't have any affiliation with YouTube (the company). That said how you use the library matters, be sure to play videos only when the player is visible. You can see here how this is also the official way of playing YouTube videos on iOS. Therefore it is 100% compliant with terms of service. The library uses YouTube's own web player to play videos. This, added to its limited options for customization and lack of Chromecast support, lead me to the development of this open source library.Ī lengthier explanation to why you may want to consider using an alternative to the official YouTube player is written in this Medium post.Ī list of published apps that are using this library: ( let me know if you want to add your app to this list)ĭoes this library breaks YouTube terms of service? I personally found it quite unreliable and therefore impossible to use in production. Unfortunately this library is quite buggy ( some bugs are 5+ years old) and has receive no updates in years.
#ANDROID VIDEO PLAYER WITH CHROMECAST ANDROID#
The official library provided by Google to integrate YouTube videos in Android apps is the YouTube Android Player API. This library also provides a Chromecast YouTube player, that you can use to cast YouTube videos from your app to a Chromecast device. However this should be done with cuation, as altering the UI of the IFrame player might break YouTube's terms of service. The UI can be completely replaced with a custom UI. The UI of the player is 100% customizable. Therefore the YouTube app is not required on the user's device and there are no issues with YouTube Terms of Service. The library is a wrapper over the IFrame Player API, which runs inside of a WebView. It provides a simple View that can be easily integrated in every Activity/Fragment. Android-youtube-player is a stable and customizable open source YouTube player for Android.