docs/doc/reference/com/google/android/exoplayer2/ext/mediasession/MediaSessionConnector.CaptionCallback.html
Package com.google.android.exoplayer2.ext.mediasession
MediaSessionConnector.CommandReceiverEnclosing class:MediaSessionConnectorpublic static interfaceMediaSessionConnector.CaptionCallbackextends[MediaSessionConnector.CommandReceiver](MediaSessionConnector.CommandReceiver.html "interface in com.google.android.exoplayer2.ext.mediasession")
Handles requests for enabling or disabling captions.
All Methods Instance Methods Abstract Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| boolean | hasCaptions(Player player) |
Returns whether the media currently being played has captions.
|
| void | onSetCaptioningEnabled(Player player, boolean enabled) |
See MediaSessionCompat.Callback.onSetCaptioningEnabled(boolean).
|
-
onCommand
-
void onSetCaptioningEnabled([Player](../../Player.html "interface in com.google.android.exoplayer2")player,
boolean enabled)
See MediaSessionCompat.Callback.onSetCaptioningEnabled(boolean).
-
boolean hasCaptions([Player](../../Player.html "interface in com.google.android.exoplayer2")player)
Returns whether the media currently being played has captions.
This method is called each time the media session playback state needs to be updated and published upon a player state change.