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:
 Subscribe video raw data with a delegate.
 
(ZoomVideoSDKError- startVideoPreview:resolution:
 Subscribe to preview 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.
 
(visionos) - API_UNAVAILABLE
 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.
 
(visionos) - API_UNAVAILABLE
 Determine if the current device(phone, pad) support the multi camera feature or not.
 
(BOOL) - enableMultiStreamVideo:customDeviceName:
 Enable multiple video stream support if you have multiple cameras and other participants can see multiple videos of you.
 
(BOOL) - disableMultiStreamVideo:
 Disable the multiple video stream.
 
(BOOL) - muteMultiStreamVideo:
 Turn off the multiple video stream.
 
(BOOL) - unmuteMultiStreamVideo:
 Turn on the multiple video stream.
 
(NSString *_Nullable) - getDeviceIDByMyPipe:
 Get the device ID associated with my multi-camera pipe.
 
(NSString *_Nullable) - getDeviceIDByMyCanvas:
 Get 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 104 of file ZoomVideoSDKVideoHelper.h.

Method Documentation

◆ API_UNAVAILABLE [1/2]

- (visionos) API_UNAVAILABLE

Switch to the next available camera.

◆ API_UNAVAILABLE [2/2]

- (visionos) API_UNAVAILABLE

Determine if the current device(phone, pad) support the multi camera feature or not.

Returns
If the function succeeds, it will return YES, otherwise it returns NO.

◆ 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.

◆ disableMultiStreamVideo:

- (BOOL) disableMultiStreamVideo: (visionos) API_UNAVAILABLE

Disable the multiple video stream.

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

◆ 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.

◆ enableMultiStreamVideo:customDeviceName:

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

Enable 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 will return YES, otherwise it returns NO.
Warning
Only two cameras can open at the same time.

◆ 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.

◆ getDeviceIDByMyCanvas:

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

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

Parameters
canvasOne of my multi-camera canvases.
Returns
The video device ID if successful. Otherwise it returns nil.

◆ getDeviceIDByMyPipe:

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

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

Parameters
pipeOne of my multi-camera pipes.
Returns
The video device ID if successful. Otherwise it returns nil.

◆ 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.

◆ muteMultiStreamVideo:

- (BOOL) muteMultiStreamVideo: (visionos) API_UNAVAILABLE

Turn off the multiple video stream.

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

◆ 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.

◆ startVideoPreview:resolution:

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

Subscribe to preview video raw data with a delegate.

Parameters
delegateThe delegate which receives rawdata of preview video.
resolutionSpecify the resolution at which to open the camera.
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:

- (BOOL) switchCamera: (visionos) API_UNAVAILABLE

Switch camera by camera ID.

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

◆ unmuteMultiStreamVideo:

- (BOOL) unmuteMultiStreamVideo: (visionos) API_UNAVAILABLE

Turn on the multiple video stream.

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

◆ 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.