ChemCollective - Advanced (1 week) workshop ending on Saturday, 5 December 2020   ||   R - Beginner (1 day) workshop on Saturday, 28 November 2020  
Click here to register

Playing video using YouTube API - English

1343 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