LiveKit Swift Client SDK Documentation

Class Audio​Manager

public class AudioManager: Loggable  
%201 AudioManager AudioManager Loggable Loggable AudioManager->Loggable

Nested Types

AudioManager.TrackState
AudioManager.State

Conforms To

Loggable

Allows to extend with custom log method which automatically captures current type (class name).

Nested Type Aliases

Configure​Audio​Session​Func

public typealias ConfigureAudioSessionFunc = (_ newState: State,
                                                  _ oldState: State) -> Void

Properties

shared

public static let shared  

custom​Configure​Audio​Session​Func

public var customConfigureAudioSessionFunc: ConfigureAudioSessionFunc? 

Use this to provide a custom func to configure the audio session instead of defaultConfigureAudioSessionFunc(newState:oldState:). This method should not block and is expected to return immediately.

prefer​Speaker​Output

public var preferSpeakerOutput: Bool  

Set this to false if you prefer using the device's receiver instead of speaker. Defaults to true. This only works when the audio output is set to the built-in speaker / receiver.

Methods

default​Configure​Audio​Session​Func(new​State:​old​State:​)

public func defaultConfigureAudioSessionFunc(newState: State, oldState: State)  

The default implementation when audio session configuration is requested by the SDK. Configure the RTCAudioSession of WebRTC framework.

Note: It is recommended to use RTCAudioSessionConfiguration.webRTC() to obtain an instance of RTCAudioSessionConfiguration instead of instantiating directly.

Parameters

configuration

A configured RTCAudioSessionConfiguration

set​Active

passing true/false will call AVAudioSession.setActive internally