IVSImageDevice
This represents an IVSDevice that provides video samples.
-
Sets the current rotation of the video device. This will be used to transform the output stream
This is handled automatically when attaching a camera via an
IVSDeviceDescriptor
.Declaration
Objective-C
- (void)setHandsetRotation:(float)rotation;
Swift
func setHandsetRotation(_ rotation: Float)
Parameters
rotation
The rotation in radians
-
Gets a view that will render a preview image of this device.
Note
this must be called on the main thread
Declaration
Objective-C
- (nullable IVSImagePreviewView *)previewViewWithError: (NSError *_Nullable *_Nullable)outError;
Swift
func previewView() throws -> IVSImagePreviewView
Parameters
outError
On input, a pointer to an error object. If an error occurs, the pointer is an NSError object that describes the error. If you don’t want error information, pass in nil.
-
Gets a view that will render a preview image of this device with the provided aspect ratio.
Note
this must be called on the main thread
Declaration
Objective-C
- (nullable IVSImagePreviewView *) previewViewWithAspectMode:(IVSAspectMode)aspectMode error:(NSError *_Nullable *_Nullable)outError;
Swift
func previewView(with aspectMode: IVSBroadcastConfiguration.AspectMode) throws -> IVSImagePreviewView
Parameters
aspectMode
the aspect mode to apply to the image stream rendering on the view.
outError
On input, a pointer to an error object. If an error occurs, the pointer is an NSError object that describes the error. If you don’t want error information, pass in nil.