Package 

Class BackgroundPlaybackNotification

    • Method Summary

      Modifier and Type Method Description
      final PlaybackNotification.StreamType getCurrentlyPlayingStreamType()
      Unit setPlayback(MediaPlayback<?> playback) Set a MediaPlayback to associate the notification
      MediaPlayback<ExoPlayer> getPlayback() Get the MediaPlayback associated with the notification
      Unit setConfig(PlaybackNotificationConfig config) Configure and customize the notification shown for playback.
      Boolean show() 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.
      Unit cancel() Cancels the notification by setting the player to null.
      Boolean isVisible() Check is the notification is showing.
      Unit setMediaSessionToken(MediaSessionCompat.Token token) Sets the MediaSessionCompat.Token.
      • Methods inherited from class com.brightcove.playback.notification.BackgroundPlaybackNotification

        getStreamTypes, setStreamTypes
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • setPlayback

         Unit setPlayback(MediaPlayback<?> playback)

        Set a MediaPlayback to associate the notification

      • getPlayback

         MediaPlayback<ExoPlayer> getPlayback()

        Get the MediaPlayback associated with the notification

      • setConfig

         Unit setConfig(PlaybackNotificationConfig config)

        Configure and customize the notification shown for playback.

        Parameters:
        config - The configuration to build the notification.
      • show

         Boolean show()

        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.

        <p> The notification shows if the currently playing {@link StreamType} is one of {@link this#getStreamTypes()}
      • cancel

         Unit cancel()

        Cancels the notification by setting the player to null.

        This should be called when the player is released.