Skip to main content

Camera & Microphone

The SDK does its best to make working with the camera and microphone easy. We expose the following objects on the call:

let call = "default", callId: "123")
let camera =
let microphone = call.microphone
let speaker = call.speaker

Camera Manager

The following methods are available on the camera manager:

try await // enable the camera
try await // disable the camera
try await // switch between front and back camera

The camera manager also exposes these observables: // front/back // enabled/ disabled.

Microphone Manager

The microphone manager supports changing the mic state:

try await call.microphone.enable() // enable the microphone
try await call.microphone.disable() // disable the microphone

You can get the microphone status like this:

call.microphone.status // enabled/ disabled.

Noise Cancellation

Check our Noise Cancellation guide.

Speaker Manager

The speaker allows you to enable/disable the speaker phone.

try await call.speaker.enableSpeakerPhone()
try await call.speaker.disableSpeakerPhone()

Additionally, you can enable/disable the audio output on the device.

try await call.speaker.enableAudioOutput()
try await call.speaker.disableAudioOutput()

Did you find this page helpful?