CompositeAudioHandler class
A CompositeAudioHandler wraps another AudioHandler and adds additional behaviour to it. Each method will by default pass through to the corresponding method of the wrapped handler. If you override a method, it must call super in addition to any "additional" functionality you add.
- Inheritance
-
- Object
- AudioHandler
- CompositeAudioHandler
- Implementers
Constructors
- CompositeAudioHandler.new(AudioHandler inner)
- Create the CompositeAudioHandler with the given wrapped handler.
Properties
-
androidPlaybackInfo
→ ValueStream<
AndroidPlaybackInfo> -
A value stream of the current
AndroidPlaybackInfo
.no setteroverride - customEvent → Stream
-
A stream of custom events.
no setteroverride
- customState → ValueStream
-
A stream of custom states.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
-
mediaItem
→ ValueStream<
MediaItem?> -
A value stream of the current media item.
no setteroverride
-
playbackState
→ ValueStream<
PlaybackState> -
A value stream of playback states.
no setteroverride
-
queue
→ ValueStream<
List< MediaItem> > -
A value stream of the current queue.
no setteroverride
-
queueTitle
→ ValueStream<
String> -
A value stream of the current queueTitle.
no setteroverride
-
ratingStyle
→ ValueStream<
RatingStyle> -
A value stream of the current rating style.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addQueueItem(
MediaItem mediaItem) → Future< void> -
Add
mediaItem
to the queue.override -
addQueueItems(
List< MediaItem> mediaItems) → Future<void> -
Add
mediaItems
to the queue.override -
androidAdjustRemoteVolume(
AndroidVolumeDirection direction) → Future< void> -
Adjust the remote volume on Android. This works only when using
RemoteAndroidPlaybackInfo.
override
-
androidSetRemoteVolume(
int volumeIndex) → Future< void> -
Set the remote volume on Android. This works only when using
RemoteAndroidPlaybackInfo.
override
-
click(
[MediaButton button = MediaButton.media]) → Future< void> -
Process a headset button click, where
button
defaults to MediaButton.media.override -
customAction(
String name, [Map< String, dynamic> ? extras]) → Future -
A mechanism to support app-specific actions.
override
-
fastForward(
) → Future< void> -
Jump forward by AudioServiceConfig.fastForwardInterval.
override
-
getChildren(
String parentMediaId, [Map< String, dynamic> ? options]) → Future<List< MediaItem> > -
Get the children of a parent media item.
override
-
getMediaItem(
String mediaId) → Future< MediaItem?> -
Get a particular media item.
override
-
insertQueueItem(
int index, MediaItem mediaItem) → Future< void> -
Insert
mediaItem
into the queue at positionindex
.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onNotificationDeleted(
) → Future< void> -
Handle the notification being swiped away (Android).
override
-
onTaskRemoved(
) → Future< void> -
Handle the task being swiped away in the task manager (Android).
override
-
pause(
) → Future< void> -
Pause playback.
override
-
play(
) → Future< void> -
Start or resume playback.
override
-
playFromMediaId(
String mediaId, [Map< String, dynamic> ? extras]) → Future<void> -
Play a specific media item.
override
-
playFromSearch(
String query, [Map< String, dynamic> ? extras]) → Future<void> -
Begin playback from a search query.
override
-
playFromUri(
Uri uri, [Map< String, dynamic> ? extras]) → Future<void> -
Play a media item represented by a Uri.
override
-
playMediaItem(
MediaItem mediaItem) → Future< void> -
Play a specific media item.
override
-
prepare(
) → Future< void> -
Prepare media items for playback.
override
-
prepareFromMediaId(
String mediaId, [Map< String, dynamic> ? extras]) → Future<void> -
Prepare a specific media item for playback.
override
-
prepareFromSearch(
String query, [Map< String, dynamic> ? extras]) → Future<void> -
Prepare playback from a search query.
override
-
prepareFromUri(
Uri uri, [Map< String, dynamic> ? extras]) → Future<void> -
Prepare a media item represented by a Uri for playback.
override
-
removeQueueItem(
MediaItem mediaItem) → Future< void> -
Remove
mediaItem
from the queue.override -
removeQueueItemAt(
int index) → Future< void> -
Remove media item from the queue at the specified
index
.override -
rewind(
) → Future< void> -
Jump backward by AudioServiceConfig.rewindInterval. Note: this value
must be positive.
override
-
search(
String query, [Map< String, dynamic> ? extras]) → Future<List< MediaItem> > -
Search for media items.
override
-
seek(
Duration position) → Future< void> -
Seek to
position
.override -
seekBackward(
bool begin) → Future< void> -
Begin or end seeking backward continuously.
override
-
seekForward(
bool begin) → Future< void> -
Begin or end seeking forward continuously.
override
-
setCaptioningEnabled(
bool enabled) → Future< void> -
Set whether captioning is enabled.
override
-
setRating(
Rating rating, [Map< String, dynamic> ? extras]) → Future<void> -
Set the rating.
override
-
setRepeatMode(
AudioServiceRepeatMode repeatMode) → Future< void> -
Set the repeat mode.
override
-
setShuffleMode(
AudioServiceShuffleMode shuffleMode) → Future< void> -
Set the shuffle mode.
override
-
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.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
updateMediaItem(
MediaItem mediaItem) → Future< void> -
Update the properties of
mediaItem
.override -
updateQueue(
List< MediaItem> queue) → Future<void> -
Update to the queue to
queue
.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited