Video SDK for iOS API Reference
Loading...
Searching...
No Matches
ZoomVideoSDKVideoHelper Class Reference

An interface to control video and manage cameras during a video session. More...

#include <ZoomVideoSDKVideoHelper.h>

Inherits NSObject.

Instance Methods

(ZoomVideoSDKError- startVideoPreview:
 Subscribes to video raw data with a delegate.
 
(ZoomVideoSDKError- startVideoPreview:resolution:
 Subscribes to preview video raw data with a delegate.
 
(ZoomVideoSDKError- stopVideoPreview:
 Unsubscribes from preview video raw data with the subscribed delegate.
 
(ZoomVideoSDKError- startVideoCanvasPreview:andAspectMode:
 Subscribes to preview with a canvas view.
 
(ZoomVideoSDKError- stopVideoCanvasPreview:
 Unsubscribes from preview with a canvas view.
 
(ZoomVideoSDKError- startVideo
 Starts sending local video data from the camera.
 
(ZoomVideoSDKError- stopVideo
 Stops sending local video data from the camera.
 
(BOOL) - rotateMyVideo:
 Rotates the video when the device is rotated.
 
(ZoomVideoSDKError- mirrorMyVideo:
 Mirrors the current user's video.
 
(BOOL) - isMyVideoMirrored
 Determines whether mirror my video is enabled.
 
(void) - switchCamera
 Switches to the next available camera.
 
(NSArray< ZoomVideoSDKCameraDevice * > *_Nullable) - getCameraDeviceList
 Gets the camera device list.
 
(BOOL) - switchCamera:
 Switches camera by camera ID.
 
(ZoomVideoSDKCameraDevice *_Nullable) - getSelectedCamera
 Gets the current camera device in use.
 
(ZoomVideoSDKError- setVideoQualityPreference:
 Adjusts user's video resolution and frame rate.
 
(BOOL) - isOriginalAspectRatioEnabled
 Determines whether current aspect ratio is the original aspect ratio of video.
 
(BOOL) - enableOriginalAspectRatio:
 Sets the aspect ratio of the video sent out.
 
(BOOL) - canEnableAlphaChannelMode
 Determines whether alpha channel mode can be enabled.
 
(ZoomVideoSDKError- enableAlphaChannelMode:
 Enables or disables video alpha channel mode.
 
(BOOL) - isAlphaChannelModeEnabled
 Determines whether alpha channel mode is enabled.
 
(BOOL) - isDeviceSupportAlphaChannelMode
 Determines whether the device hardware capabilities are capable of supporting video alpha mode.
 
(ZoomVideoSDKError- spotLightVideo:
 Spotlights user's video.
 
(ZoomVideoSDKError- unSpotLightVideo:
 Unspotlights user's video.
 
(ZoomVideoSDKError- unSpotlightAllVideos
 Sets all user's video unspotlight.
 
(NSArray< ZoomVideoSDKUser * > *_Nullable) - getSpotlightedVideoUserList
 Gets spotlighted video user list.
 
(BOOL) - isMultiStreamSupported
 Determines whether the current device (phone, pad) supports the multi camera feature.
 
(BOOL) - enableMultiStreamVideo:customDeviceName:
 Enables multiple video stream support if you have multiple cameras and other participants can see multiple videos of you.
 
(BOOL) - disableMultiStreamVideo:
 Disables the multiple video stream.
 
(BOOL) - muteMultiStreamVideo:
 Turns off the multiple video stream.
 
(BOOL) - unmuteMultiStreamVideo:
 Turns on the multiple video stream.
 
(NSString *_Nullable) - getDeviceIDByMyPipe:
 Gets the device ID associated with my multi-camera pipe.
 
(NSString *_Nullable) - getDeviceIDByMyCanvas:
 Gets the device ID associated with my multi-camera canvas.
 

Detailed Description

An interface to control video and manage cameras during a video session.

Definition at line 101 of file ZoomVideoSDKVideoHelper.h.

Method Documentation

◆ canEnableAlphaChannelMode

- (BOOL) canEnableAlphaChannelMode

Determines whether alpha channel mode can be enabled.

Returns
YES if it can be enabled. Otherwise, NO.
Warning
Only host can enable the alpha mode. Your account must have this feature turned on by Support.

◆ disableMultiStreamVideo:

- (BOOL) disableMultiStreamVideo: (NSString *_Nullable) cameraDeviceID

Disables the multiple video stream.

Parameters
cameraDeviceIDThe camera ID that you want to disable. SeeZoomVideoSDKCameraDevice}.
Returns
If the function succeeds, it returns YES. Otherwise, NO.

◆ enableAlphaChannelMode:

- (ZoomVideoSDKError) enableAlphaChannelMode: (BOOL) enable

Enables or disables video alpha channel mode.

Parameters
enableYES to enable alpha channel mode, NO to disable.
Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.

◆ enableMultiStreamVideo:customDeviceName:

- (BOOL) enableMultiStreamVideo: (NSString *_Nullable) cameraDeviceID
customDeviceName: (NSString *_Nullable) customDeviceName 

Enables multiple video stream support if you have multiple cameras and other participants can see multiple videos of you.

Parameters
cameraDeviceIDThe camera ID for the camera to enable. SeeZoomVideoSDKCameraDevice}.
customDeviceNameThe custom device name of the camera. If you don't pass this parameter, the SDK generates a default name.
Returns
If the function succeeds, it returns YES. Otherwise, NO.
Warning
Only two cameras can open at the same time.

◆ enableOriginalAspectRatio:

- (BOOL) enableOriginalAspectRatio: (BOOL) enabled

Sets the aspect ratio of the video sent out.

Parameters
enabledNO means the aspect ratio is 16:9, YES means using the original aspect ratio of video.
Returns
If the function succeeds, it returns YES. Otherwise, NO.
Warning
If session is using video source and data_mode is not VideoSourceDataMode_None, default always uses original aspect ratio of video.

◆ getCameraDeviceList

- (NSArray< ZoomVideoSDKCameraDevice * > *_Nullable) getCameraDeviceList

Gets the camera device list.

Returns
If the function succeeds, it returns an NSArray of ZoomVideoSDKCameraDevice objects. Otherwise, this function fails and returns nil.
Warning
Only iOS 17.0 or above and iPad device can get the external camera devices.

◆ getDeviceIDByMyCanvas:

- (NSString *_Nullable) getDeviceIDByMyCanvas: (ZoomVideoSDKVideoCanvas *_Nullable) canvas

Gets the device ID associated with my multi-camera canvas.

Parameters
canvasOne of my multi-camera canvases.
Returns
If the function succeeds, it returns the video device ID. Otherwise, this function fails and returns nil.

◆ getDeviceIDByMyPipe:

- (NSString *_Nullable) getDeviceIDByMyPipe: (ZoomVideoSDKRawDataPipe *_Nullable) pipe

Gets the device ID associated with my multi-camera pipe.

Parameters
pipeOne of my multi-camera pipes.
Returns
If the function succeeds, it returns the video device ID. Otherwise, this function fails and returns nil.

◆ getSelectedCamera

- (ZoomVideoSDKCameraDevice *_Nullable) getSelectedCamera

Gets the current camera device in use.

Returns
If the function succeeds, it returns a ZoomVideoSDKCameraDevice object. Otherwise, this function fails and returns nil.

◆ getSpotlightedVideoUserList

- (NSArray< ZoomVideoSDKUser * > *_Nullable) getSpotlightedVideoUserList

Gets spotlighted video user list.

Returns
If the function succeeds, it returns an NSArray of ZoomVideoSDKUser objects. Otherwise, this function fails and returns nil.

◆ isAlphaChannelModeEnabled

- (BOOL) isAlphaChannelModeEnabled

Determines whether alpha channel mode is enabled.

Returns
YES if alpha channel mode is enabled. Otherwise, NO.

◆ isDeviceSupportAlphaChannelMode

- (BOOL) isDeviceSupportAlphaChannelMode

Determines whether the device hardware capabilities are capable of supporting video alpha mode.

Returns
YES if the current device supports it. Otherwise, NO.
Warning
Device should be iPhone 8, 8 Plus, X or above or be iPad Pro 9.7 above, OS should be iOS 11 or above. And should embed zoomcml.xcframework.

◆ isMultiStreamSupported

- (BOOL) isMultiStreamSupported

Determines whether the current device (phone, pad) supports the multi camera feature.

Returns
YES if the device supports multi camera feature. Otherwise, NO.

◆ isMyVideoMirrored

- (BOOL) isMyVideoMirrored

Determines whether mirror my video is enabled.

Returns
YES if mirror my video is enabled. Otherwise, NO.
Warning
This function only works for canvas.

◆ isOriginalAspectRatioEnabled

- (BOOL) isOriginalAspectRatioEnabled

Determines whether current aspect ratio is the original aspect ratio of video.

Returns
YES if it is original aspect ratio. Otherwise, NO.

◆ mirrorMyVideo:

- (ZoomVideoSDKError) mirrorMyVideo: (BOOL) enable

Mirrors the current user's video.

Parameters
enableYES to enable mirror my video, NO to reset the mirror effect back.
Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.
Warning
Valid only for canvas.

◆ muteMultiStreamVideo:

- (BOOL) muteMultiStreamVideo: (NSString *_Nullable) cameraDeviceID

Turns off the multiple video stream.

Parameters
cameraDeviceIDThe camera ID running as a multiple camera. SeeZoomVideoSDKCameraDevice}.
Returns
If the function succeeds, it returns YES. Otherwise, NO.

◆ rotateMyVideo:

- (BOOL) rotateMyVideo: (UIDeviceOrientation) rotation

Rotates the video when the device is rotated.

Parameters
rotationThe orientation you want to rotate.
Returns
If the function succeeds, it returns YES. Otherwise, NO.
Warning
The function only works for internal video source, it does not work for capture video source.

◆ setVideoQualityPreference:

- (ZoomVideoSDKError) setVideoQualityPreference: (ZoomVideoSDKVideoPreferenceSetting *_Nullable) preferenceSetting

Adjusts user's video resolution and frame rate.

Parameters
preferenceSettingAn instance of ZoomVideoSDKVideoPreferenceSetting.
Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.

◆ spotLightVideo:

- (ZoomVideoSDKError) spotLightVideo: (ZoomVideoSDKUser *_Nullable) user

Spotlights user's video.

Parameters
userThe user which you want to spotlight.
Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.

◆ startVideo

- (ZoomVideoSDKError) startVideo

Starts sending local video data from the camera.

Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.

◆ startVideoCanvasPreview:andAspectMode:

- (ZoomVideoSDKError) startVideoCanvasPreview: (UIView *_Nullable) view
andAspectMode: (ZoomVideoSDKVideoAspect) aspect 

Subscribes to preview with a canvas view.

Parameters
viewThe view which draws the preview video.
aspectThe aspect mode of the preview.
Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.

◆ startVideoPreview:

- (ZoomVideoSDKError) startVideoPreview: (id< ZoomVideoSDKRawDataPipeDelegate >_Nullable) delegate

Subscribes to video raw data with a delegate.

Parameters
delegateThe delegate which receives raw data of preview video.
Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.
Deprecated
Use startVideoPreview:resolution: instead.

◆ startVideoPreview:resolution:

- (ZoomVideoSDKError) startVideoPreview: (id< ZoomVideoSDKRawDataPipeDelegate >_Nullable) delegate
resolution: (ZoomVideoSDKVideoResolution) resolution 

Subscribes to preview video raw data with a delegate.

Parameters
delegateThe delegate which receives raw data of preview video.
resolutionThe resolution at which to open the camera.
Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.

◆ stopVideo

- (ZoomVideoSDKError) stopVideo

Stops sending local video data from the camera.

Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.

◆ stopVideoCanvasPreview:

- (ZoomVideoSDKError) stopVideoCanvasPreview: (UIView *_Nullable) view

Unsubscribes from preview with a canvas view.

Parameters
viewThe view which draws raw data of preview video.
Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.

◆ stopVideoPreview:

- (ZoomVideoSDKError) stopVideoPreview: (id< ZoomVideoSDKRawDataPipeDelegate > _Nullable) delegate

Unsubscribes from preview video raw data with the subscribed delegate.

Parameters
delegateThe delegate which receives raw data of preview video.
Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.

◆ switchCamera

- (void) switchCamera

Switches to the next available camera.

◆ switchCamera:

- (BOOL) switchCamera: (NSString *_Nullable) cameraId

Switches camera by camera ID.

Parameters
cameraIdThe target camera ID.
Returns
If the function succeeds, it returns YES. Otherwise, NO.

◆ unmuteMultiStreamVideo:

- (BOOL) unmuteMultiStreamVideo: (NSString *_Nullable) cameraDeviceID

Turns on the multiple video stream.

Parameters
cameraDeviceIDThe camera ID running as a multiple camera. SeeZoomVideoSDKCameraDevice}.
Returns
If the function succeeds, it returns YES. Otherwise, NO.

◆ unSpotlightAllVideos

- (ZoomVideoSDKError) unSpotlightAllVideos

Sets all user's video unspotlight.

Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.

◆ unSpotLightVideo:

- (ZoomVideoSDKError) unSpotLightVideo: (ZoomVideoSDKUser *_Nullable) user

Unspotlights user's video.

Parameters
userThe user which you want to unspotlight.
Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.