Interface: WireAudioSessionOptions
Defined in: packages/audio-session/src/wire.ts:54
Properties
duckVolume?
optional duckVolume?: number;
Defined in: packages/audio-session/src/wire.ts:67
Volume to attenuate to on a duck interruption. Interpreted as an
absolute level in the player's scale; the helper never raises the volume,
so the effective target is min(currentVolume, duckVolume).
Default
0.3
onError?
optional onError?: (error: unknown) => void;
Defined in: packages/audio-session/src/wire.ts:87
Called when the initial configure(preset) rejects.
wireAudioSession is synchronous (it returns the unwire function), so the
configure promise has nowhere else to go. Defaults to console.error —
the error is never swallowed.
Parameters
| Parameter | Type |
|---|---|
error | unknown |
Returns
void
preset?
optional preset?: AudioSessionConfig;
Defined in: packages/audio-session/src/wire.ts:59
Config to apply before wiring. Omit to wire listeners onto a session you configured yourself.
resumeAfterInterruption?
optional resumeAfterInterruption?: boolean;
Defined in: packages/audio-session/src/wire.ts:74
Resume playback when a pause-type interruption ends with
shouldResume: true.
Default
true
session?
optional session?: AudioSessionApi;
Defined in: packages/audio-session/src/wire.ts:79
Session to wire against. Defaults to the process singleton; injectable so the state machine can be tested without a device.