This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val channelId = helper.publishChannel(previewChannel) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val helper = PreviewChannelHelper(context) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.build() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.setLogo(bitmap) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val previewChannel = PreviewChannel.Builder() | |
.setDisplayName(name) | |
.setDescription(description) | |
.setAppLinkIntentUri(Uri.parse(deeplinkUri)) | |
.setInternalProviderId(getPlaylistId()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PreviewChannelHelper(context).publishWatchNextProgram(program) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.setWatchNextType( | |
WatchNextPrograms.WATCH_NEXT_TYPE_CONTINUE) | |
.setContentId(myProgramId) | |
.setType(PreviewPrograms.TYPE_MOVIE) | |
.setTitle("Program Title") | |
.setDescription("Program Description") | |
.setPosterArtUri( | |
Uri.parse("http://example.com/poster_art.png")) | |
.setLastEngagementTimeUtcMillis(System.currentTimeMillis()) | |
Then you build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val program = WatchNextProgram.Builder() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyMediaSessionCallback: MediaSessionCompat.Callback { | |
override fun onPause() { ... } | |
override fun onPlay() { ... } | |
override fun onStop() { ... } | |
override fun onSeekTo(position: Long) { ... } | |
override fun onSkipToNext() { ... } | |
override fun onSkipToPrevious() { ... }} | |
mediaSession.setCallback(myMediaSessionCallback) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mediaSession = new MediaSessionCompat(this, "sample"); | |
mediaSessionConnector = new MediaSessionConnector(mediaSession); | |
mediaSessionConnector.setPlayer(player); |