PlayerNotificationProperties

data class PlayerNotificationProperties(val playerNotificationID: Int = (1L..10000L).random().toInt(), val playerNotificationChannelID: String = getApplicationContext().packageName, val pendingIntent: PendingIntent? = null, val showRewindAction: Boolean = true, val showFastForwardAction: Boolean = true, val showRewindActionInCompactView: Boolean = true, val showFastForwardActionInCompactView: Boolean = true, val showPreviousAction: Boolean = true, val showNextAction: Boolean = true, val showPlayPauseActions: Boolean = true, val showStopAction: Boolean = false, val showPlayPauseActionsForLive: Boolean = false, val showStopActionForLive: Boolean = true) : Parcelable

Encapsulates all the configurable properties applicable for audio playback to post the player notification . All the properties have recommended default values that are suitable for the most cases.

Constructors

Link copied to clipboard
@RequiresApi(value = 29)
constructor(parcel: Parcel)
constructor(playerNotificationID: Int = (1L..10000L).random().toInt(), playerNotificationChannelID: String = getApplicationContext().packageName, pendingIntent: PendingIntent? = null, showRewindAction: Boolean = true, showFastForwardAction: Boolean = true, showRewindActionInCompactView: Boolean = true, showFastForwardActionInCompactView: Boolean = true, showPreviousAction: Boolean = true, showNextAction: Boolean = true, showPlayPauseActions: Boolean = true, showStopAction: Boolean = false, showPlayPauseActionsForLive: Boolean = false, showStopActionForLive: Boolean = true)

Types

Link copied to clipboard
class Builder
Link copied to clipboard

Properties

Link copied to clipboard

Activity to be launched when the player notification is clicked. If not set, on click player notification, device's home screen will be launched.

Link copied to clipboard

The id of the notification channel of an existing notification channel or of the channel that should be automatically created. By default it is application's package name. NOTE: This is required to build the Player Notification

Link copied to clipboard

The id of the notification to be posted. Must be greater than 0.

Link copied to clipboard

Sets whether the fast forward action should be used or not. This is applicable only for On-demand content. NOTE: By default it is true for on-demand content.

Link copied to clipboard

Sets whether the fast forward action should also be used or not in compact view. This has no effect if showFastForwardAction is not enabled. This is applicable only for On-demand content. NOTE: By default it is true for on-demand content.

Link copied to clipboard

Sets whether the next action should be used or not. This is applicable only for On-demand content. NOTE: By default it is true for on-demand content.

Link copied to clipboard

Sets whether the play/pause action should be used or not. This is applicable only for On-demand content. NOTE: By default it is true for on-demand content.

Link copied to clipboard

Sets whether the play/pause action should be used or not. This is applicable only for live content. NOTE: By default it is false for live content.

Link copied to clipboard

Sets whether the previous action should be used or not. This is applicable only for On-demand content. NOTE: By default it is true for on-demand content.

Link copied to clipboard

Sets whether the rewind action should be used or not. This is applicable only for On-demand content. NOTE: By default it is true for on-demand content.

Link copied to clipboard

Sets whether the rewind action should also be used or not in compact view. This has no effect if showRewindAction is not enabled. This is applicable only for On-demand content. NOTE: By default it is true for on-demand content.

Link copied to clipboard
val showStopAction: Boolean = false

Sets whether the stop action should be used or not. This is applicable only for On-demand content. NOTE: By default it is false for on-demand content.

Link copied to clipboard

Sets whether the stop action should be used or not. This is applicable only for live content. NOTE: By default it is true for live content.

Functions

Link copied to clipboard
open override fun describeContents(): Int
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun writeToParcel(parcel: Parcel, flags: Int)