Back to Exoplayer

MediaSessionConnector.CommandReceiver (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/ext/mediasession/MediaSessionConnector.CommandReceiver.html

latest2.0 KB
Original Source

Package com.google.android.exoplayer2.ext.mediasession

Interface MediaSessionConnector.CommandReceiver

  • All Known Subinterfaces:MediaSessionConnector.CaptionCallback, MediaSessionConnector.PlaybackPreparer, MediaSessionConnector.QueueEditor, MediaSessionConnector.QueueNavigator, MediaSessionConnector.RatingCallbackAll Known Implementing Classes:TimelineQueueEditor, TimelineQueueNavigatorEnclosing class:MediaSessionConnector

public static interfaceMediaSessionConnector.CommandReceiver

Receiver of media commands sent by a media controller.

Method Summary

All Methods Instance Methods Abstract Methods | Modifier and Type | Method | Description | | --- | --- | --- | | boolean | onCommand​(Player player, String command, Bundle extras, ResultReceiver cb) | See MediaSessionCompat.Callback.onCommand(String, Bundle, ResultReceiver). |

Method Detail

- 

onCommand

boolean onCommand​([Player](../../Player.html "interface in com.google.android.exoplayer2")player,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")command,
                  @Nullable[Bundle](https://developer.android.com/reference/android/os/Bundle.html "class or interface in android.os")extras,
                  @Nullable[ResultReceiver](https://developer.android.com/reference/android/os/ResultReceiver.html "class or interface in android.os")cb)

See MediaSessionCompat.Callback.onCommand(String, Bundle, ResultReceiver). The receiver may handle the command, but is not required to do so. Parameters:player - The player connected to the media session.command - The command name.extras - Optional parameters for the command, may be null.cb - A result receiver to which a result may be sent by the command, may be null.Returns:Whether the receiver handled the command.