SoundSessionRequestPreferences class Core
Preferences used when requesting an audio session from the platform.
This object controls how the SDK requests audio focus (category, preferred output, delay before granting focus and exclusivity).
Modificatios to an instance of this class are not applied automatically. To apply changes, call SoundPlayingService.soundSessionRequestPreferences.
Also see:
- SoundPlayingService.soundSessionRequestPreferences - Get or set the preferences
Constructors
- SoundSessionRequestPreferences({required AudioCategory audioCategory, required AudioOutput audioOutput, required Duration delay, required bool exclusive})
- Create sound session request preferences.
-
SoundSessionRequestPreferences.fromMap(Map<
String, dynamic> map) -
Deserializes a JSON-compatible map to create an instance.
factory
Properties
- audioCategory → AudioCategory
-
The audio category used for the session request.
final
- audioOutput → AudioOutput
-
Preferred audio output for the session.
final
- delay → Duration
-
Delay before granting audio focus.
final
- exclusive → bool
-
Whether the session should be exclusive.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> - Serializes this instance to a JSON-compatible map.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override