MediaKitBackgroundPlayer class
- Inheritance
-
- Object
- AudioHandler
- BaseAudioHandler
- MediaKitBackgroundPlayer
Properties
-
androidPlaybackInfo
→ BehaviorSubject<AndroidPlaybackInfo>
-
A controller for broadcasting the current
AndroidPlaybackInfo to the app's UI,
media notification and other clients. Example usage:
finalinherited
-
customEvent
→ PublishSubject
-
A controller for broadcasting a custom event to the app's UI.
A shorthand for the event stream is
customEvent.
Example usage:
finalinherited
-
customState
→ BehaviorSubject
-
A controller for broadcasting the current custom state to the app's UI.
Example usage:
finalinherited
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
mediaItem
→ BehaviorSubject<MediaItem?>
-
A controller for broadcasting the current media item to the app's UI,
media notification and other clients. Example usage:
finalinherited
-
mediaKit
→ MediaKitPlayer
-
final
-
playbackState
→ BehaviorSubject<PlaybackState>
-
A controller for broadcasting the current
PlaybackState to the app's UI,
media notification and other clients. Example usage:
finalinherited
-
queue
→ BehaviorSubject<List<MediaItem>>
-
A controller for broadcasting the current queue to the app's UI, media
notification and other clients. Example usage:
finalinherited
-
queueTitle
→ BehaviorSubject<String>
-
A controller for broadcasting the current queue title to the app's UI, media
notification and other clients. Example usage:
finalinherited
-
ratingStyle
→ BehaviorSubject<RatingStyle>
-
A controller for broadcasting the current rating style to the app's UI,
media notification and other clients. Example usage:
finalinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addMediaItem(List<MediaRecord> mediaItems)
→ Future<void>
-
-
addQueueItem(MediaItem mediaItem)
→ Future<void>
-
Add
mediaItem to the queue.
inherited
-
addQueueItems(List<MediaItem> mediaItems)
→ Future<void>
-
Add
mediaItems to the queue.
inherited
-
androidAdjustRemoteVolume(AndroidVolumeDirection direction)
→ Future<void>
-
Adjust the remote volume on Android. This works only when using
RemoteAndroidPlaybackInfo.
inherited
-
androidSetRemoteVolume(int volumeIndex)
→ Future<void>
-
Set the remote volume on Android. This works only when using
RemoteAndroidPlaybackInfo.
inherited
-
checkIfLastSong(PlayerState playerState)
→ bool
-
-
clearQueue()
→ void
-
/////////////////////////////////////////////////////////////////////////////
-
click([MediaButton button = MediaButton.media])
→ Future<void>
-
Process a headset button click, where
button defaults to
MediaButton.media.
inherited
-
customAction(String name, [])
→ Future<void>
-
A mechanism to support app-specific actions.
override
-
fastForward()
→ Future<void>
-
Jump forward by AudioServiceConfig.fastForwardInterval.
inherited
-
getChildren(String parentMediaId, [Map<String, dynamic>? options])
→ Future<List<MediaItem>>
-
Get the children of a parent media item.
inherited
-
getMediaItem(String mediaId)
→ Future<MediaItem?>
-
Get a particular media item.
inherited
-
initBackgroundPlayer()
→ void
-
-
initListeners()
→ void
-
-
insertQueueItem(int index, MediaItem mediaItem)
→ Future<void>
-
Insert
mediaItem into the queue at position index.
inherited
-
loadMedia(List<MediaRecord> mediaItems)
→ Future<void>
-
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
onNotificationDeleted()
→ Future<void>
-
Handle the notification being swiped away (Android).
inherited
-
onTaskRemoved()
→ Future<void>
-
Handle the task being swiped away in the task manager (Android).
inherited
-
pause()
→ Future<void>
-
Pause playback.
override
-
play()
→ Future<void>
-
Start or resume playback.
override
-
playFromMediaId(String mediaId, [])
→ Future<void>
-
Play a specific media item.
inherited
-
playFromSearch(String query, [])
→ Future<void>
-
Begin playback from a search query.
inherited
-
playFromUri(Uri uri, [])
→ Future<void>
-
Play a media item represented by a Uri.
inherited
-
playMediaItem(MediaItem mediaItem)
→ Future<void>
-
Play a specific media item.
inherited
-
prepare()
→ Future<void>
-
Prepare media items for playback.
inherited
-
prepareFromMediaId(String mediaId, [])
→ Future<void>
-
Prepare a specific media item for playback.
inherited
-
prepareFromSearch(String query, [])
→ Future<void>
-
Prepare playback from a search query.
inherited
-
prepareFromUri(Uri uri, [])
→ Future<void>
-
Prepare a media item represented by a Uri for playback.
inherited
-
removeQueueItem(MediaItem mediaItem)
→ Future<void>
-
Remove
mediaItem from the queue.
inherited
-
removeQueueItemAt(int index)
→ Future<void>
-
Remove media item from the queue at the specified
index.
inherited
-
rewind()
→ Future<void>
-
Jump backward by AudioServiceConfig.rewindInterval. Note: this value
must be positive.
inherited
-
search(String query, [])
→ Future<List<MediaItem>>
-
Search for media items.
inherited
-
seek(Duration position)
→ Future<void>
-
Seek to
position.
override
-
seekBackward(bool begin)
→ Future<void>
-
Begin or end seeking backward continuously.
inherited
-
seekForward(bool begin)
→ Future<void>
-
Begin or end seeking forward continuously.
inherited
-
setCaptioningEnabled(bool enabled)
→ Future<void>
-
Set whether captioning is enabled.
inherited
-
setRating(Rating rating, [])
→ Future<void>
-
Set the rating.
inherited
-
setRepeatMode(AudioServiceRepeatMode repeatMode)
→ Future<void>
-
Set the repeat mode.
inherited
-
setShuffleMode(AudioServiceShuffleMode shuffleMode)
→ Future<void>
-
Set the shuffle mode.
inherited
-
setSpeed(double speed)
→ Future<void>
-
Set the playback speed.
override
-
skipToNext()
→ Future<void>
-
Skip to the next item in the queue.
override
-
skipToPrevious()
→ Future<void>
-
Skip to the previous item in the queue.
override
-
skipToQueueItem(int index)
→ Future<void>
-
Skip to a queue item.
override
-
stop()
→ Future<void>
-
Stop playback and release resources.
override
-
subscribeToChildren(String parentMediaId)
→ ValueStream<Map<String, dynamic>>
-
Get a value stream that emits service-specific options to send to the
client whenever the children under the specified parent change. The
emitted options may contain information about what changed. A client that
is subscribed to this stream should call getChildren to obtain the
changed children.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
-
updateMediaItem(MediaItem mediaItem)
→ Future<void>
-
Update the properties of
mediaItem.
inherited
-
updateQueue(List<MediaItem> queue)
→ Future<void>
-
Update to the queue to
queue.
inherited