AudioSystem class

Sends information to the OS's background audio system.

Only call these methods if you have an Audio to play in the background, and you wish to inform the OS on properties for display/interaction, i.e. showing metadata, and supporting interaction from the lockscreen/ control-center (iOS), notification (Android), or external controllers like bluetooth, watch, auto.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addMediaEventListener(ValueChanged<MediaEvent> listener) → void
handleNativeMediaEventCallback(Map arguments) → void
Handle the MethodCalls from the native implementation layer.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeMediaEventListener(ValueChanged<MediaEvent> listener) → void
setAndroidNotificationButtons(List androidMediaButtons, {List<int>? androidCompactIndices}) → void
Specify buttons for display in the Android notification.
setIosAudioCategory(IosAudioCategory category) Future<void>
Sets the iOS audio category.
setMetadata(AudioMetadata metadata) → void
Set the media metadata for display in the OS's background audio system.
setPlaybackState(bool isPlaying, double positionSeconds) → void
Inform the OS's background audio system about the playback state; used to set the progress bar in lockscreen/notification.
setSupportedMediaActions(Set<MediaActionType> actions, {double? skipIntervalSeconds}) → void
Set the supported actions in the OS's background audio system.
stopBackgroundDisplay() → void
Clears the display of the OS's background audio display.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance AudioSystem
no setter