I want to play youtube video inside viewpager, I ready documentation where mentioned that download the youtube android player api sk . But in the documentation youtube player documentation showing it is deprecated so how can I implement this.
I want to play youtube video link in youtube playerview with play pause funtionality which is provided by default by youtube. and when it slide it will stop automatically.
Want to implement like this :-
4 Answers 4
As they say in the banner, you should use the IFramePlayer API inside a Webview.
Otherwise you can use this library (I am the owner): android-youtube-player. It uses the IFrame Player API inside a Webview but offers a native interface to it, so you can use Java/Kotlin to interact with the player.
10 Comments
Youtube-Android-Player-Helper(YTPlayer)
Helper library for Android developers looking to add YouTube video playback in their applications via the iframe player in WebView
dependencies {
compile 'com.jaedongchicken:ytplayer:1.4.4'
}
https://github.com/JackDinealKIM/youtube-android-player-helper
2 Comments
I have created an simple implementation using iframe webview as official player has been deprecated due to security vulnerabilities...
Here's sample link of a project
Comments
The YouTube Android Player SDK (version 1.2.2) is no longer supported or maintained by YouTube. This SDK should not be used, due to security vulnerabilities. Please use the YouTube IFrame Player API instead.
The SDK is no longer available for download. It will be fully deprecated on or after May 1, 2023.
You get the below error going forth -