Video SDK for iOS API Reference
All Classes Files Functions Enumerations Enumerator Properties
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:
 Subscribe video raw data with a delegate.
 
(ZoomVideoSDKError- stopVideoPreview:
 UnSubscribe preview video raw data with the subscribed delegate.
 
(ZoomVideoSDKError- startVideoCanvasPreview:andAspectMode:
 Subscribe preview with a canvas view.
 
(ZoomVideoSDKError- stopVideoCanvasPreview:
 UnSubscribe preview with a canvas view.
 
(ZoomVideoSDKError- startVideo
 Call this method to start sending local video data from the camera.
 
(ZoomVideoSDKError- stopVideo
 Call this method to stop sending local video data from the camera.
 
(BOOL) - rotateMyVideo:
 Call this method to rotate the video when the device is rotated.
 
(ZoomVideoSDKError- mirrorMyVideo:
 Mirrors the current user's video.
 
(BOOL) - isMyVideoMirrored
 Determine whether mirror my video is enabled.
 
(void) - switchCamera
 Switch to the next available camera.
 
(NSArray< ZoomVideoSDKCameraDevice * > *_Nullable) - getCameraDeviceList
 Get the camera device list.
 
(BOOL) - switchCamera:
 Switch camera by camera ID.
 
(ZoomVideoSDKCameraDevice *_Nullable) - getSelectedCamera
 Get the current camera device in use.
 
(ZoomVideoSDKError- setVideoQualityPreference:
 Adjust user's video resolution and frame-rate.
 
(BOOL) - isOriginalAspectRatioEnabled
 Determine whether current aspect ratio is the original aspect ratio of video.
 
(BOOL) - enableOriginalAspectRatio:
 This function is used to set the aspect ratio of the video sent out.
 
(BOOL) - canEnableAlphaChannelMode
 Determine if alpha channel mode can be enabled.
 
(ZoomVideoSDKError- enableAlphaChannelMode:
 Enable or disable video alpha channel mode.
 
(BOOL) - isAlphaChannelModeEnabled
 Determine if alpha channel mode is enabled.
 
(BOOL) - isDeviceSupportAlphaChannelMode
 Determines whether the device hardware capabilities are capable of supporting video alpha mode.
 
(ZoomVideoSDKError- spotLightVideo:
 Call this method to spotlight user's video.
 
(ZoomVideoSDKError- unSpotLightVideo:
 Call this method to unSpotlight user's video.
 
(ZoomVideoSDKError- unSpotlightAllVideos
 Call this method to set all user's video unSpotlight.
 
(NSArray< ZoomVideoSDKUser * > *_Nullable) - getSpotlightedVideoUserList
 Call this method to get spotlighted video user list.
 

Detailed Description

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

Definition at line 68 of file ZoomVideoSDKVideoHelper.h.

Method Documentation

◆ canEnableAlphaChannelMode

- (BOOL) canEnableAlphaChannelMode

Determine if alpha channel mode can be enabled.

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

◆ enableAlphaChannelMode:

- (ZoomVideoSDKError) enableAlphaChannelMode: (BOOL) enable

Enable or disable video alpha channel mode.

Parameters
enableYES indicates to enable alpha channel mode. Otherwise, disable it.
Returns
If the function succeeds, the return value is Errors_Success. Otherwise it failed. To get extended error information, see ZoomVideoSDKError.

◆ enableOriginalAspectRatio:

- (BOOL) enableOriginalAspectRatio: (BOOL) enabled

This function is used to set the aspect ratio of the video sent out.

Parameters
enabledfalse means the aspect ratio is 16:9, true means that using the original aspect ratio of video
Returns
YES if is original aspect ratio, otherwise NO.
Warning
If session is using video source and data_mode is not VideoSourceDataMode_None, default always use original aspect ration of video.

◆ getCameraDeviceList

- (NSArray< ZoomVideoSDKCameraDevice * > *_Nullable) getCameraDeviceList

Get the camera device list.

Returns
The list of cameras.
Warning
Only iOS 17.0 or above and iPad device can get the external camera devices.

◆ getSelectedCamera

- (ZoomVideoSDKCameraDevice *_Nullable) getSelectedCamera

Get the current camera device in use.

Returns
return the current camra device in use.

◆ getSpotlightedVideoUserList

- (NSArray< ZoomVideoSDKUser * > *_Nullable) getSpotlightedVideoUserList

Call this method to get spotlighted video user list.

Returns
If the function succeeds, the return value is Errors_Success, Otherwise failed. To get extended error information, see [ZoomVideoSDKError] enum.

◆ isAlphaChannelModeEnabled

- (BOOL) isAlphaChannelModeEnabled

Determine if alpha channel mode is enabled.

Returns
YES indicates 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 indicates that current device supports it, Otherwise, it indicates that the device performance is weak and does not support it.
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 be embed zoomcml.xcframework.

◆ isMyVideoMirrored

- (BOOL) isMyVideoMirrored

Determine whether mirror my video is enabled.

Returns
Returns YES if mirror my video is enabled, otherwise NO.
Warning
this function only for canvas.

◆ isOriginalAspectRatioEnabled

- (BOOL) isOriginalAspectRatioEnabled

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

Returns
YES if 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
the result of it.
Warning
Valid only for canvas.

◆ rotateMyVideo:

- (BOOL) rotateMyVideo: (UIDeviceOrientation) rotation

Call this method to rotate the video when the device is rotated.

Parameters
rotationThe orientation you want to rotate.
Returns
Returns YES if the rotation was successful, NO otherwise.
Warning
the function only for internal video source, it's not work for capture video source.

◆ setVideoQualityPreference:

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

Adjust user's video resolution and frame-rate.

Parameters
preferenceSettingAn instance of ZoomVideoSDKVideoPreferenceSetting.
Returns
If the function succeeds, it will return Errors_Success.

◆ spotLightVideo:

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

Call this method to spotlight user's video.

Parameters
userThe user which you want to spotlight
Returns
If the function succeeds, the return value is Errors_Success, Otherwise failed. To get extended error information, see [ZoomVideoSDKError] enum.

◆ startVideo

- (ZoomVideoSDKError) startVideo

Call this method to start sending local video data from the camera.

Returns
the result of it.

◆ startVideoCanvasPreview:andAspectMode:

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

Subscribe preview with a canvas view.

Parameters
viewThe view which draws the preview video.
aspectThe acpect mode of the preview.
Returns
ZoomVideoSDKError error code.

◆ startVideoPreview:

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

Subscribe video raw data with a delegate.

Parameters
delegateThe delegate which receives rawdata of preview video.
Returns
ZoomVideoSDKError error code.

◆ stopVideo

- (ZoomVideoSDKError) stopVideo

Call this method to stop sending local video data from the camera.

Returns
the result of it.

◆ stopVideoCanvasPreview:

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

UnSubscribe preview with a canvas view.

Parameters
viewThe view which draws rawdata of preview video.
Returns
ZoomVideoSDKError error code.

◆ stopVideoPreview:

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

UnSubscribe preview video raw data with the subscribed delegate.

Parameters
delegateThe delegate which receives rawdata of preview video.
Returns
ZoomVideoSDKError error code.

◆ switchCamera

- (void) switchCamera

Switch to the next available camera.

◆ switchCamera:

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

Switch camera by camera ID.

Parameters
cameraIdThe target camera ID.
Returns
Yes means it successfully switched camera, otherwise not.

◆ unSpotlightAllVideos

- (ZoomVideoSDKError) unSpotlightAllVideos

Call this method to set all user's video unSpotlight.

Returns
If the function succeeds, the return value is Errors_Success, Otherwise failed. To get extended error information, see [ZoomVideoSDKError] enum.

◆ unSpotLightVideo:

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

Call this method to unSpotlight user's video.

Parameters
userThe user which you want to unSpotlight
Returns
If the function succeeds, the return value is Errors_Success, Otherwise failed. To get extended error information, see [ZoomVideoSDKError] enum.