VICameraVideoSource
VoximplantCalls · iOS SDK v3
Class that provides the API to manage camera devices.
@objc final class VICameraVideoSource
Properties
currentDevice
@objc var currentDevice: VICameraDevice? { get }
Default or selected camera device.
delegate
@objc weak var delegate: VICameraVideoSourceDelegate?
Camera video source delegate.
devices
@objc var devices: [VICameraDevice] { get }
Array of available camera devices.
preferredResolution
@objc var preferredResolution: CGSize { get }
Preferred camera resolution.
The default value is 640x480.
shared
@objc static let shared: VICameraVideoSource
Shared instance.
type
let type: VISourceType
Local video source type — camera.
Methods
changePreferredResolution(to:)
@objc func changePreferredResolution(to size: CGSize)
Changes the preferrred camera resolution.
Parameters
size CGSize
Camera resolution
changePreferredResolution(to:)
@objc(changePreferredResolutiontoToQualityPreset:) func changePreferredResolution(
to qualityPreset: VIQualityPreset
)
Changes the preferrred camera resolution with a quality preset.
Parameters
qualityPreset VIQualityPreset
Quality preset
selectCameraDevice(_:completion:)
@objc func selectCameraDevice(
_ selectedDevice: VICameraDevice,
completion: @escaping (VIVideoSourceError?) -> Void
)
Selects a camera device.
Parameters
selectedDevice VICameraDevice
Camera device
completion @escaping (VIVideoSourceError?) -> Void
Completion handler to call when the operation is complete. This handler is executed on the delegate queue. The SDK passes the VIVideoSourceError object if the operation has failed.
If a capture session is running with another camera device, the method stops the capture session with that device and starts the capturer session with a selected camera device.
Relationships
Inherits From: NSObject
Conforms To: ObjectiveC.NSObjectProtocol, Swift.CVarArg, Swift.CustomDebugStringConvertible, Swift.CustomStringConvertible, Swift.Equatable, Swift.Hashable, VILocalVideoSource