Search code examples
androidkotlinyoutubeplayer

YouTube Android Player API deprecated in 2023 so how can Implement youtube player in android studio


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.

Youtube player image

Want to implement like this :-

enter image description here


Solution

  • 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