SoundPlayingPreferences class Core
Preferences controlling how the SDK plays sounds and TTS.
Use this object to configure per-severity sound settings (volume, maximum playback time, audio stream type and focus delay).
Modificatios to an instance of this class are not applied automatically. To apply changes, call SoundPlayingService.setSoundPlayingPreferences.
Also see:
- SoundPlayingService.setSoundPlayingPreferences - Set the preferences
- SoundPlayingService.getSoundPlayingPreferences - Get the current preferences
Constructors
- SoundPlayingPreferences({required int volume, required Duration maxPlayingTime, required AudioStreamType audioStreamType, required Duration delay})
- Create sound playing preferences.
-
SoundPlayingPreferences.fromMap(Map<
String, dynamic> map) -
Deserializes a JSON-compatible map to create an instance.
factory
Properties
- audioStreamType ↔ AudioStreamType
-
The audio stream used for playback.
getter/setter pair
- delay ↔ Duration
-
Delay before requesting audio focus when using certain outputs.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setteroverride
- maxPlayingTime ↔ Duration
-
Maximum playback time.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- volume ↔ int
-
The playback volume (0..10).
getter/setter pair
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