Sunday, January 31, 2016

YouTubeStandalonePlayer API

This is the simplest form to launch the player using the Intent. Using this, we can we can launch a play video, a playlist, or a video list 

The intents are like below 

YouTubeStandalonePlayer.createVideoIntent(this, DeveloperKey.DEVELOPER_KEY, VIDEO_ID, startTimeMillis, autoplay, lightboxMode);

To play a paylist, below can be done 
intent = YouTubeStandalonePlayer.createPlaylistIntent(this, DeveloperKey.DEVELOPER_KEY,PLAYLIST_ID, startIndex, startTimeMillis, autoplay, lightboxMode);

To play a list of videos, below can be used. 
intent = YouTubeStandalonePlayer.createVideosIntent(this, DeveloperKey.DEVELOPER_KEY,
                                                    VIDEO_IDS, startIndex, startTimeMillis, autoplay, lightboxMode);

Does this mechanism allows to programmatically dismiss the video player intent and come back to the original application? 

Does this mechanism allows to programmatically pause, stop, seek the item being played? 


References:
https://developers.google.com/youtube/android/player/

No comments:

Post a Comment