Video SDK for MacOS API Reference
|
Provides functions to control virtual background. More...
#include <ZMVideoSDKVideoHelper.h>
Inherits NSObject.
Instance Methods | |
(ZMVideoSDKErrors) | - startVideo |
Call this method to start sending local video data from the camera. | |
(ZMVideoSDKErrors) | - 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. | |
(BOOL) | - switchCamera |
Switch to the next available camera. | |
(BOOL) | - selectCamera: |
Switch to the camera passed in as cameraDevice. | |
(unsigned int) | - getNumberOfCameras |
Returns number of cameras available to share the video. | |
(NSArray< ZMVideoSDKCameraDevice * > *_Nullable) | - getCameraList |
Returns a collection of camera devices available to share the video as an object of ZMVideoSDKCameraDevice. | |
(ZMVideoSDKErrors) | - canControlCamera:deviceID: |
Check whether the current user has permission to control the camera. | |
(ZMVideoSDKErrors) | - turnCameraLeft:deviceID: |
Pan the camera to the left. | |
(ZMVideoSDKErrors) | - turnCameraRight:deviceID: |
Pan the camera to the right. | |
(ZMVideoSDKErrors) | - turnCameraUp:deviceID: |
Tilt the camera up. | |
(ZMVideoSDKErrors) | - turnCameraDown:deviceID: |
Tilt the camera down. | |
(ZMVideoSDKErrors) | - zoomCameraIn:deviceID: |
Zoom the camera in. | |
(ZMVideoSDKErrors) | - zoomCameraOut:deviceID: |
Zoom the camera out. | |
(ZMVideoSDKErrors) | - setVideoQualityPreference: |
Adjust user's video solution and frame-rate. | |
(BOOL) | - enableMultiStreamVideo:customDeviceName: |
Enable multiple stream video if you have multiple cameras, and other participants can see multiple videos of you. | |
(BOOL) | - disableMultiStreamVideo: |
Disable multiple stream video. | |
(BOOL) | - muteMultiStreamVideo: |
Turn off multiple stream video. | |
(BOOL) | - unmuteMultiStreamVideo: |
Turn on multiple stream video. | |
(NSString *_Nullable) | - getDeviceIDByMyPipe: |
Get the device ID associated with my multi-camera pipe. | |
(ZMVideoSDKErrors) | - startVideoPreview:deviceID: |
Subscribe preview video raw data with a callback. | |
(ZMVideoSDKErrors) | - startVideoPreview:deviceID:resolution: |
Subscribe to preview video raw data with a callback. | |
(ZMVideoSDKErrors) | - stopVideoPreview: |
UnSubscribe preview video raw data with the subscribed callback. | |
(ZMVideoSDKErrors) | - startVideoCanvasPreview:deviceID: |
Starts the preview video with a view. | |
(ZMVideoSDKErrors) | - stopVideoCanvasPreview: |
Stops the preview video. | |
(ZMVideoSDKErrors) | - addVirtualBackgroundItem:imageItem: |
Add virtual background object. | |
(ZMVideoSDKErrors) | - removeVirtualBackgroundItem: |
Remove virtual background object. | |
(NSArray< ZMVideoSDKVirtualBackgroundItem * > *_Nullable) | - getVirtualBackgroundItemList |
Returns a collection of virtual background item as an object of ZMVideoSDKVirtualBackgroundItem. | |
(ZMVideoSDKErrors) | - setVirtualBackgroundItem: |
Select virtual background item. | |
(ZMVideoSDKVirtualBackgroundItem *_Nullable) | - getSelectedVirtualBackgroundItem |
Get a selected virtual background item. | |
(BOOL) | - isOriginalAspectRatioEnabled |
Determine whether current aspect ratio is the original aspect ratio of video. | |
(BOOL) | - enableOriginalAspectRatio: |
Set the aspect ratio of the video sent out. | |
(ZMVideoSDKErrors) | - mirrorMyVideo: |
Mirrors the current user's video. Valid only for canvas. | |
(BOOL) | - isMyVideoMirrored |
Determine whether mirror my video is enabled. | |
(BOOL) | - isDeviceSupportAlphaChannelMode |
Determine if the current device supports alpha channel mode. | |
(BOOL) | - canEnableAlphaChannelMode |
Determine if alpha channel mode can be enabled. | |
(ZMVideoSDKErrors) | - enableAlphaChannelMode: |
Enable or disable alpha channel mode. | |
(BOOL) | - isAlphaChannelModeEnabled |
Determine if alpha channel mode is enabled. | |
(ZMVideoSDKErrors) | - spotLightVideo: |
Call this method to spotlight user's video. | |
(ZMVideoSDKErrors) | - unSpotLightVideo: |
Call this method to unSpotlight user's video. | |
(ZMVideoSDKErrors) | - unSpotlightAllVideos |
Call this method to set all user's video unSpotlight. | |
(NSArray< ZMVideoSDKUser * > *_Nullable) | - getSpotlightedVideoUserList |
Enable or disable alpha channel mode. | |
Provides functions to control virtual background.
An interface to control video and manage cameras during a video session.
Definition at line 100 of file ZMVideoSDKVideoHelper.h.
- (ZMVideoSDKErrors) addVirtualBackgroundItem: | (NSString *) | imagePath | |
imageItem: | (ZMVideoSDKVirtualBackgroundItem *_Nullable *_Nonnull) | imageItem |
Add virtual background object.
imagePath | The path of image. |
imageItem | An object of ZMVideoSDKVirtualBackgroundItem. Once the function is called successfully, this parameter will store the pointer to the ZMVideoSDKVirtualBackgroundItem*. |
- (ZMVideoSDKErrors) canControlCamera: | (BOOL *) | canControl | |
deviceID: | (nullable NSString *) | deviceID |
Check whether the current user has permission to control the camera.
canControl | The output parameter. YES means can control local camera, otherwise not. |
deviceID | The camera device ID to check. The default is the main camera ID. |
- (BOOL) canEnableAlphaChannelMode |
Determine if alpha channel mode can be enabled.
- (BOOL) disableMultiStreamVideo: | (NSString *) | cameraDeviceID |
Disable multiple stream video.
cameraDeviceID | The camera id which you want to disable. |
- (ZMVideoSDKErrors) enableAlphaChannelMode: | (BOOL) | enabled |
Enable or disable alpha channel mode.
enabled | YES indicates to enable alpha channel mode. Otherwise, disable it. |
- (BOOL) enableMultiStreamVideo: | (NSString *) | cameraDeviceID | |
customDeviceName: | (nullable NSString *) | customDeviceName |
Enable multiple stream video if you have multiple cameras, and other participants can see multiple videos of you.
cameraDeviceID | The camera ID for the camera to enable. |
customDeviceName | The custom device name of the camera. If this parameter is not passed, a default name will be generated. |
- (BOOL) enableOriginalAspectRatio: | (BOOL) | bEnabled |
Set the aspect ratio of the video sent out.
bEnabled | NO means the aspect ratio is 16:9, YES means that using the original aspect ratio of video. |
- (NSArray< ZMVideoSDKCameraDevice * > *_Nullable) getCameraList |
Returns a collection of camera devices available to share the video as an object of ZMVideoSDKCameraDevice.
- (NSString *_Nullable) getDeviceIDByMyPipe: | (ZMVideoSDKRawDataPipe *) | pipe |
Get the device ID associated with my multi-camera pipe.
pipe | My multi-camera pipe. |
- (unsigned int) getNumberOfCameras |
Returns number of cameras available to share the video.
- (ZMVideoSDKVirtualBackgroundItem *_Nullable) getSelectedVirtualBackgroundItem |
Get a selected virtual background item.
- (NSArray< ZMVideoSDKUser * > *_Nullable) getSpotlightedVideoUserList |
Enable or disable alpha channel mode.
- (NSArray< ZMVideoSDKVirtualBackgroundItem * > *_Nullable) getVirtualBackgroundItemList |
Returns a collection of virtual background item as an object of ZMVideoSDKVirtualBackgroundItem.
- (BOOL) isAlphaChannelModeEnabled |
Determine if alpha channel mode is enabled.
- (BOOL) isDeviceSupportAlphaChannelMode |
Determine if the current device supports alpha channel mode.
- (BOOL) isMyVideoMirrored |
Determine whether mirror my video is enabled.
- (BOOL) isOriginalAspectRatioEnabled |
Determine whether current aspect ratio is the original aspect ratio of video.
- (ZMVideoSDKErrors) mirrorMyVideo: | (BOOL) | bEnabled |
Mirrors the current user's video. Valid only for canvas.
bEnabled | YES to enable mirror my video. |
- (BOOL) muteMultiStreamVideo: | (NSString *) | cameraDeviceID |
Turn off multiple stream video.
cameraDeviceID | The camera ID which is running as multiple camera. |
- (ZMVideoSDKErrors) removeVirtualBackgroundItem: | (ZMVideoSDKVirtualBackgroundItem *) | imageItem |
Remove virtual background object.
imageItem | The ZMVideoSDKVirtualBackgroundItem object to be removed. |
- (BOOL) rotateMyVideo: | (ZMVideoRotation) | rotation |
Call this method to rotate the video when the device is rotated.
rotation | It is emum. |
- (BOOL) selectCamera: | (NSString *) | cameraDeviceID |
Switch to the camera passed in as cameraDevice.
cameraDeviceID | The id of camera. |
- (ZMVideoSDKErrors) setVideoQualityPreference: | (ZMVideoSDKPreferenceSetting *) | preferenceSetting |
Adjust user's video solution and frame-rate.
preferenceSetting | An instance of ZMVideoSDKPreferenceSetting. |
- (ZMVideoSDKErrors) setVirtualBackgroundItem: | (ZMVideoSDKVirtualBackgroundItem *) | imageItem |
Select virtual background item.
imageItem | The ZMVideoSDKVirtualBackgroundItem object to select. |
- (ZMVideoSDKErrors) spotLightVideo: | (ZMVideoSDKUser *) | user |
Call this method to spotlight user's video.
user | Which you want to spotlight video. |
- (ZMVideoSDKErrors) startVideo |
Call this method to start sending local video data from the camera.
- (ZMVideoSDKErrors) startVideoCanvasPreview: | (NSView *) | view | |
deviceID: | (NSString *_Nullable) | cameraDeviceID |
Starts the preview video with a view.
view | The view to preview video. |
cameraDeviceID | The camera ID. |
- (ZMVideoSDKErrors) startVideoPreview: | (id< ZMVideoSDKRawDataPipeDelegate >) | listener | |
deviceID: | (NSString *_Nullable) | cameraDeviceID |
Subscribe preview video raw data with a callback.
listener | The callback sink object. |
cameraDeviceID | The camera id. |
ZMVideoSDKErrors_Success
. - (ZMVideoSDKErrors) startVideoPreview: | (id< ZMVideoSDKRawDataPipeDelegate >) | listener | |
deviceID: | (NSString *_Nullable) | cameraDeviceID | |
resolution: | (ZMVideoSDKResolution) | resolution |
Subscribe to preview video raw data with a callback.
listener | The callback object. |
cameraDeviceID | Camera device ID. |
resolution | Specify the resolution at which to open the camera. |
- (ZMVideoSDKErrors) stopVideo |
Call this method to stop sending local video data from the camera.
- (ZMVideoSDKErrors) stopVideoCanvasPreview: | (NSView *) | view |
Stops the preview video.
view | The view to preview video. |
- (ZMVideoSDKErrors) stopVideoPreview: | (id< ZMVideoSDKRawDataPipeDelegate >) | listener |
UnSubscribe preview video raw data with the subscribed callback.
listener | The callback sink object. |
- (BOOL) switchCamera |
Switch to the next available camera.
- (ZMVideoSDKErrors) turnCameraDown: | (unsigned int) | range | |
deviceID: | (nullable NSString *) | deviceID |
Tilt the camera down.
range | Rotation range, 10 <= range <= 100. |
deviceID | The camera device ID to rotate. The default is the main camera ID. |
- (ZMVideoSDKErrors) turnCameraLeft: | (unsigned int) | range | |
deviceID: | (nullable NSString *) | deviceID |
Pan the camera to the left.
range | Rotation range, 10 <= range <= 100. |
deviceID | The camera device ID to rotate. The default is the main camera ID. |
- (ZMVideoSDKErrors) turnCameraRight: | (unsigned int) | range | |
deviceID: | (nullable NSString *) | deviceID |
Pan the camera to the right.
range | Rotation range, 10 <= range <= 100. |
deviceID | The camera device ID to rotate. The default is the main camera ID. |
- (ZMVideoSDKErrors) turnCameraUp: | (unsigned int) | range | |
deviceID: | (nullable NSString *) | deviceID |
Tilt the camera up.
range | Rotation range, 10 <= range <= 100. |
deviceID | The camera device ID to rotate. The default is the main camera ID. |
- (BOOL) unmuteMultiStreamVideo: | (NSString *) | cameraDeviceID |
Turn on multiple stream video.
cameraDeviceID | The camera ID which is running as multiple camera. |
- (ZMVideoSDKErrors) unSpotlightAllVideos |
Call this method to set all user's video unSpotlight.
- (ZMVideoSDKErrors) unSpotLightVideo: | (ZMVideoSDKUser *) | user |
Call this method to unSpotlight user's video.
user | Which you want to unSpotlight video. |
- (ZMVideoSDKErrors) zoomCameraIn: | (unsigned int) | range | |
deviceID: | (nullable NSString *) | deviceID |
Zoom the camera in.
range | Zoom range, 10 <= range <= 100. |
deviceID | The camera device ID to operate. The default is the main camera ID. |
- (ZMVideoSDKErrors) zoomCameraOut: | (unsigned int) | range | |
deviceID: | (nullable NSString *) | deviceID |
Zoom the camera out.
range | Zoom range, 10 <= range <= 100. |
deviceID | The camera device ID to operate. The default is the main camera ID. |