@magiclane/maps-sdk
    Preparing search index...

    Class SoundPlayingPreferences

    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.

    • SoundPlayingService.setSoundPlayingPreferences - Set the preferences
    • SoundPlayingService.getSoundPlayingPreferences - Get the current preferences
    Index

    Constructors

    • Create sound playing preferences.

      Parameters

      • options: {
            audioStreamType: AudioStreamType;
            delay: number;
            maxPlayingTime: number;
            volume: number;
        }

        Preferences configuration

        • audioStreamType: AudioStreamType

          Which audio stream to use

        • delay: number

          Delay granting audio focus in milliseconds (useful for Bluetooth-as-phone-call output)

        • maxPlayingTime: number

          Maximum play time in milliseconds. Range: 0..255000 ms. Use 0 for no limit

        • volume: number

          Playback volume (0..10)

      Returns SoundPlayingPreferences

    Properties

    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

    • Hash code calculation

      Returns number

    • Internal

      Serializes this instance to a JSON-compatible object.

      Used internally, not intended for direct use by consumers. The object structure may change without notice.

      Returns Record<string, any>

    • Internal

      Deserializes a JSON-compatible object to create an instance.

      Used internally, not intended for direct use by consumers. The expected object structure may change without notice.

      Parameters

      • map: Record<string, any>

      Returns SoundPlayingPreferences