Home > @magiclane/maps-sdk > SoundPlayingPreferences

SoundPlayingPreferences class

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).

Modifications to an instance of this class are not applied automatically. To apply changes, call SoundPlayingService.setSoundPlayingPreferences.

Signature:

export declare class SoundPlayingPreferences 

Constructors

Constructor

Modifiers

Description

(constructor)({ volume, maxPlayingTime, audioStreamType, delay, }, input)

Create sound playing preferences.

Properties

Property

Modifiers

Type

Description

audioStreamType

AudioStreamType

The audio stream used for playback.

delay

number

Delay before requesting audio focus when using certain outputs (in milliseconds).

maxPlayingTime

number

Maximum playback time in milliseconds.

Range: 0..255000 ms (255 seconds). Use 0 for no limit.

volume

number

The playback volume (0..10).

Default: 5

Methods

Method

Modifiers

Description

equals(other)

Equality comparison

hashCode()

Hash code calculation