Home > @magiclane/maps-sdk > SoundSessionRequestPreferences

SoundSessionRequestPreferences class

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.

Signature:

export declare class SoundSessionRequestPreferences 

Constructors

Constructor

Modifiers

Description

(constructor)({ audioCategory, audioOutput, delay, exclusive, }, input)

Create sound session request preferences.

Properties

Property

Modifiers

Type

Description

audioCategory

readonly

AudioCategory

The audio category used for the session request.

See AudioCategory for common categories such as playback or recording.

audioOutput

readonly

AudioOutput

Preferred audio output for the session.

delay

readonly

number

Delay before granting audio focus (in milliseconds).

exclusive

readonly

boolean

Whether the session should be exclusive.

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

Methods

Method

Modifiers

Description

equals(other)

Equality comparison

hashCode()

Hash code calculation