IVSMultiSourceDevice
Objective-C
@protocol IVSMultiSourceDevice <IVSDevice>
Swift
protocol IVSMultiSourceDevice : IVSDevice
Represents an input device such as a camera or microphone with multiple underlying input sources.
-
List available underlying input sources for the device.
@discussion
The return order of these input sources is predictable. They are sorted by, in priority order:
position
(based onrawValue
of theIVSDevicePosition
enum in ascending order)isDefault
(YES
will appear beforeNO
)friendlyName
(sorted alphabetically in ascending order)
Declaration
Objective-C
- (nonnull NSArray<IVSDeviceDescriptor *> *)listAvailableInputSources;
Swift
func listAvailableInputSources() -> [IVSDeviceDescriptor]
-
Sets the preferred input source.
The preferred input source of a camera device will always take effect if no error occurs. The preferred input source of a microphone device may take effect if the system allows it and no error occurs.
Declaration
Objective-C
- (void)setPreferredInputSource:(nonnull IVSDeviceDescriptor *)inputSource onComplete: (nullable void (^)(NSError *_Nullable))onComplete;
Swift
func setPreferredInputSource(_ inputSource: IVSDeviceDescriptor, onComplete: ((Error?) -> Void)? = nil)
Parameters
inputSource
The preferred input source.
onComplete
A callback that that contains any error that occurred while updating the preferred input source. Invoked when the operation has completed. Always invoked on the main queue.