Interface MediaPlayerControl.MediaPlayerControlListener
-
- Enclosing class:
- MediaPlayerControl
public static interface MediaPlayerControl.MediaPlayerControlListenerInvokes a callback when a media play message is received.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonLaunchMediaRequestReceived(LaunchMediaRequest request)WhenonLaunchMediaRequestReceived(LaunchMediaRequest)is called, launch the requested media.voidonNextRequestReceived(java.lang.String playerId)voidonNowPlayingRequestReceived(java.lang.String playerId)WhenonNowPlayingRequestReceived(String)is called, MediaPlayerControl#sendNowPlaying() sends the requested playerInfo.voidonPauseRequestReceived(java.lang.String playerId)voidonPlayRequestReceived(java.lang.String playerId)voidonPreviousRequestReceived(java.lang.String playerId)voidonSeekToRequestReceived(java.lang.String playerId, int position)voidonSetSoundtrackRequestReceived(java.lang.String playerId, java.lang.String soundtrack, java.lang.String soundtrackType)Sets the ISO 639-2 language code for the media soundtrack when this method is called.voidonSetSubtitleRequestReceived(java.lang.String playerId, java.lang.String subtitle, java.lang.String subtitleType)Sets the ISO 639-2 language code for the media subtitle when this method is called.voidonSetVolumeRequestReceived(java.lang.String playerId, int volume)Sets the volume for the media whenonSetVolumeRequestReceived(String, int)is called.voidonStepBackwardRequestReceived(java.lang.String playerId)voidonStepForwardRequestReceived(java.lang.String playerId)voidonStopRequestReceived(java.lang.String playerId)voidonVolumeDownRequestReceived(java.lang.String playerId, int step)voidonVolumeUpRequestReceived(java.lang.String playerId, int step)Sets the media volume by step increments whenonVolumeUpRequestReceived(String, int)is called.
-
-
-
Method Detail
-
onNowPlayingRequestReceived
void onNowPlayingRequestReceived(java.lang.String playerId)
WhenonNowPlayingRequestReceived(String)is called, MediaPlayerControl#sendNowPlaying() sends the requested playerInfo.- Parameters:
playerId- Unique identifier for the media player. If playerId is specified, only the specified player information is sent. If playerId is null, information is sent for all players.
-
onLaunchMediaRequestReceived
void onLaunchMediaRequestReceived(LaunchMediaRequest request)
WhenonLaunchMediaRequestReceived(LaunchMediaRequest)is called, launch the requested media.- Parameters:
request- Launch media request.
-
onPlayRequestReceived
void onPlayRequestReceived(java.lang.String playerId)
-
onPauseRequestReceived
void onPauseRequestReceived(java.lang.String playerId)
-
onStopRequestReceived
void onStopRequestReceived(java.lang.String playerId)
-
onNextRequestReceived
void onNextRequestReceived(java.lang.String playerId)
-
onPreviousRequestReceived
void onPreviousRequestReceived(java.lang.String playerId)
-
onStepForwardRequestReceived
void onStepForwardRequestReceived(java.lang.String playerId)
-
onStepBackwardRequestReceived
void onStepBackwardRequestReceived(java.lang.String playerId)
-
onSeekToRequestReceived
void onSeekToRequestReceived(java.lang.String playerId, int position)
-
onSetVolumeRequestReceived
void onSetVolumeRequestReceived(java.lang.String playerId, int volume)- Parameters:
playerId- Unique identifier for the media player.volume- Volume value is specified as 1 to 100.
-
onVolumeUpRequestReceived
void onVolumeUpRequestReceived(java.lang.String playerId, int step)- Parameters:
playerId- Unique identifier for the media player.step- Step value is specified as 0 to 100.
-
onVolumeDownRequestReceived
void onVolumeDownRequestReceived(java.lang.String playerId, int step)
-
onSetSubtitleRequestReceived
void onSetSubtitleRequestReceived(java.lang.String playerId, java.lang.String subtitle, java.lang.String subtitleType)Sets the ISO 639-2 language code for the media subtitle when this method is called.- Parameters:
playerId- Unique identifier for the media player.subtitle- ISO-639-2 language code for the media subtitle.subtitleType- Type of subtitle
-
onSetSoundtrackRequestReceived
void onSetSoundtrackRequestReceived(java.lang.String playerId, java.lang.String soundtrack, java.lang.String soundtrackType)Sets the ISO 639-2 language code for the media soundtrack when this method is called.- Parameters:
playerId- Unique identifier for the media player.soundtrack- ISO-639-2 language code for the media soundtracksoundtrackType- Type of the soundtrack
-
-