Launching StandAlonePlayerActivity
suggest change- Launch the standalone player activity.
contexthas to be an Activity.Config.YOUTUBE_API_KEY,videoId, and the “step 3” that created the key are not on this page.
Intent standAlonePlayerIntent = YouTubeStandalonePlayer.createVideoIntent((Activity) context,
Config.YOUTUBE_API_KEY, // which you have created in step 3
videoId, // video which is to be played
100, //The time, in milliseconds, where playback should start in the video
true, //autoplay or not
false); //lightbox mode or not; false will show in fullscreen
context.startActivity(standAlonePlayerIntent);
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents