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

    Class SoundSessionRequestPreferences

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

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

    SoundPlayingService.soundSessionRequestPreferences - Get or set the preferences

    Index

    Constructors

    • Create sound session request preferences.

      Parameters

      • options: {
            audioCategory: AudioCategory;
            audioOutput: AudioOutput;
            delay: number;
            exclusive: boolean;
        }

        Preferences configuration

        • audioCategory: AudioCategory

          The audio category used for the session request

        • audioOutput: AudioOutput

          Preferred audio output for the session

        • delay: number

          Delay before granting audio focus in milliseconds

        • exclusive: boolean

          Whether the session should be exclusive

      Returns SoundSessionRequestPreferences

    Properties

    audioCategory: AudioCategory

    The audio category used for the session request.

    See AudioCategory for common categories such as playback or recording.

    audioOutput: AudioOutput

    Preferred audio output for the session.

    delay: number

    Delay before granting audio focus (in milliseconds).

    exclusive: boolean

    Whether the session should be exclusive.

    When true other audio output should be silenced during the session.

    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 SoundSessionRequestPreferences