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 = streamVideo.call(callType: "default", callId: "123")
let camera = call.camera
let microphone = call.microphone
let speaker = call.speakerCamera Manager
The following methods are available on the camera manager:
try await call.camera.enable() // enable the camera
try await call.camera.disable() // disable the camera
try await call.camera.flip() // switch between front and back cameraThe camera manager also exposes these observables:
call.camera.direction // front/back
call.camera.status // 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 microphoneYou can get the microphone status like this:
call.microphone.status // enabled/ disabled.You can also toggle the microphone state:
try await call.microphone.toggle()Music mode
For music capture or higher-quality speech, select an audio bitrate profile after joining the call:
try await call.microphone.setAudioBitrateProfile(.musicHighQuality)See the Music mode guide for dashboard requirements, voice profiles, and switching back to standard audio.
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()You can also toggle the speaker phone:
try await call.speaker.toggleSpeakerPhone()Camera Focus and Zoom
The SDK provides methods to control camera focus and zoom during a call:
// Focus on a specific point (normalized coordinates 0-1)
try await call.focus(at: CGPoint(x: 0.5, y: 0.5))
// Zoom the camera (factor relative to current zoom level)
try await call.zoom(by: 2.0)These features are useful for allowing users to focus on specific areas or zoom in during screen sharing or presentations.