Package com.brightcove.player.playback
Class BrightcoveNotification
- java.lang.Object
-
- com.brightcove.player.playback.PlaybackNotification
-
- com.brightcove.player.playback.BrightcoveNotification
-
public class BrightcoveNotification extends PlaybackNotification
Manages the notification displayed with aMediaPlayback.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.brightcove.player.playback.PlaybackNotification
PlaybackNotification.Config, PlaybackNotification.Extras, PlaybackNotification.MediaDescriptionAdapter, PlaybackNotification.NotificationImageLoader, PlaybackNotification.OnRestorePlaybackHandler, PlaybackNotification.StreamType
-
-
Field Summary
-
Fields inherited from class com.brightcove.player.playback.PlaybackNotification
DEFAULT_NOTIFICATION_ID
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcancel()Cancels the notification by setting the player tonull.static BrightcoveNotificationgetInstance(android.content.Context context)MediaPlayback<com.google.android.exoplayer2.ExoPlayer>getPlayback()booleanisVisible()Check is the notification is showing.voidsetConfig(PlaybackNotification.Config config)Configure and customize the notification shown for playback.protected voidsetMediaSessionToken(android.support.v4.media.session.MediaSessionCompat.Token token)Sets theMediaSessionCompat.Token.voidsetPlayback(MediaPlayback<com.google.android.exoplayer2.ExoPlayer> playback)protected booleanshow()Starts a notification immediately unless the player is in an idle state, in which case the notification is started as soon as the player transitions away from being idle.-
Methods inherited from class com.brightcove.player.playback.PlaybackNotification
getStreamTypes, setStreamTypes
-
-
-
-
Method Detail
-
setPlayback
public void setPlayback(MediaPlayback<com.google.android.exoplayer2.ExoPlayer> playback)
-
getPlayback
public MediaPlayback<com.google.android.exoplayer2.ExoPlayer> getPlayback()
-
setConfig
public final void setConfig(PlaybackNotification.Config config)
Description copied from class:PlaybackNotificationConfigure and customize the notification shown for playback.- Specified by:
setConfigin classPlaybackNotification- Parameters:
config- The configuration to build the notification.
-
show
protected final boolean show()
Description copied from class:PlaybackNotificationStarts a notification immediately unless the player is in an idle state, in which case the notification is started as soon as the player transitions away from being idle.The notification shows if the currently playing
PlaybackNotification.StreamTypeis one of {@link this#getStreamTypes()}- Specified by:
showin classPlaybackNotification- Returns:
- True if the notification was created and showing on the device.
-
cancel
protected final void cancel()
Cancels the notification by setting the player tonull.This should be called when the player is released.
- Specified by:
cancelin classPlaybackNotification
-
isVisible
public final boolean isVisible()
Description copied from class:PlaybackNotificationCheck is the notification is showing.- Specified by:
isVisiblein classPlaybackNotification- Returns:
- True if the notification is visible and on-going.
-
setMediaSessionToken
protected void setMediaSessionToken(android.support.v4.media.session.MediaSessionCompat.Token token)
Sets theMediaSessionCompat.Token.- Parameters:
token- TheMediaSessionCompat.Token.
-
getInstance
public static BrightcoveNotification getInstance(android.content.Context context)
-
-