AudioMode

data class AudioMode(val interruptionMode: InterruptionMode = InterruptionMode.DoNotMix, val playsInSilentMode: Boolean = true)

Configures how the media player interacts with the system audio session.

On iOS, this maps to AVAudioSession category, mode, and options. On Android, this maps to AudioAttributes and audio focus behavior. On other platforms (JVM desktop, web), this has no effect.

The default AudioMode requests exclusive audio focus and ignores the iOS silent switch, matching standard media playback behavior.

Parameters

interruptionMode

How this player interacts with other apps' audio.

playsInSilentMode

iOS only: whether audio plays when the device silent switch is on.

Constructors

Link copied to clipboard
constructor(interruptionMode: InterruptionMode = InterruptionMode.DoNotMix, playsInSilentMode: Boolean = true)

Properties

Link copied to clipboard
Link copied to clipboard