Playing video using YouTube API - English

5323 visits



Outline:

Create a new project in Google cloud Generate the API key and save it Enable the YouTube API How to use YouTubePlayerView provided by YouTube Initialize the view to play a video from YouTube, by giving the video ID Download the YouTubeAndroidPlayerApi.jar file from the developers website Copy the above file in the Android Studio project Source code for YouTube player cueVideo method Run the Kotlin App and play the video