Interface MediaSessionConnector.PlaybackPreparer
-
- All Superinterfaces:
MediaSessionConnector.CommandReceiver
- Enclosing class:
- MediaSessionConnector
public static interface MediaSessionConnector.PlaybackPreparer extends MediaSessionConnector.CommandReceiver
Interface to which playback preparation and play actions are delegated.
-
-
Field Summary
Fields Modifier and Type Field Description static longACTIONS
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetSupportedPrepareActions()Returns the actions which are supported by the preparer.voidonPrepare(boolean playWhenReady)SeeMediaSessionCompat.Callback.onPrepare().voidonPrepareFromMediaId(String mediaId, boolean playWhenReady, Bundle extras)SeeMediaSessionCompat.Callback.onPrepareFromMediaId(String, Bundle).voidonPrepareFromSearch(String query, boolean playWhenReady, Bundle extras)SeeMediaSessionCompat.Callback.onPrepareFromSearch(String, Bundle).voidonPrepareFromUri(Uri uri, boolean playWhenReady, Bundle extras)SeeMediaSessionCompat.Callback.onPrepareFromUri(Uri, Bundle).-
Methods inherited from interface com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.CommandReceiver
onCommand
-
-
-
-
Field Detail
-
ACTIONS
static final long ACTIONS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSupportedPrepareActions
long getSupportedPrepareActions()
Returns the actions which are supported by the preparer. The supported actions must be a bitmask combined out ofPlaybackStateCompat.ACTION_PREPARE,PlaybackStateCompat.ACTION_PREPARE_FROM_MEDIA_ID,PlaybackStateCompat.ACTION_PREPARE_FROM_SEARCH,PlaybackStateCompat.ACTION_PREPARE_FROM_URI,PlaybackStateCompat.ACTION_PLAY_FROM_MEDIA_ID,PlaybackStateCompat.ACTION_PLAY_FROM_SEARCHandPlaybackStateCompat.ACTION_PLAY_FROM_URI.- Returns:
- The bitmask of the supported media actions.
-
onPrepare
void onPrepare(boolean playWhenReady)
SeeMediaSessionCompat.Callback.onPrepare().- Parameters:
playWhenReady- Whether playback should be started after preparation.
-
onPrepareFromMediaId
void onPrepareFromMediaId(String mediaId, boolean playWhenReady, @Nullable Bundle extras)
SeeMediaSessionCompat.Callback.onPrepareFromMediaId(String, Bundle).- Parameters:
mediaId- The media id of the media item to be prepared.playWhenReady- Whether playback should be started after preparation.extras- ABundleof extras passed by the media controller, may be null.
-
onPrepareFromSearch
void onPrepareFromSearch(String query, boolean playWhenReady, @Nullable Bundle extras)
SeeMediaSessionCompat.Callback.onPrepareFromSearch(String, Bundle).- Parameters:
query- The search query.playWhenReady- Whether playback should be started after preparation.extras- ABundleof extras passed by the media controller, may be null.
-
-