Class
AudioManager
public class AudioManager: Loggable
Relationships
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
ConfigureAudioSessionFunc
public typealias ConfigureAudioSessionFunc = (_ newState: State,
_ oldState: State) -> Void
Properties
customConfigureAudioSessionFunc
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.
preferSpeakerOutput
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
defaultConfigureAudioSessionFunc(newState:oldState:)
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 ofRTCAudioSessionConfiguration
instead of instantiating directly.
Parameters
Name | Type | Description |
---|---|---|
configuration | A configured RTCAudioSessionConfiguration |
|
setActive | passing true/false will call |