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

The helper to set the video mask. More...

#include <ZoomVideoSDKMaskHelper.h>

Inherits NSObject.

Instance Methods

(UIImage *_Nullable) - generateMask:width:height:
 Generates a mask UIImage based on the mask information that is located within the canvas width or the canvas height. The recommended aspect ratio is 1280 * 720 or 720 * 1280.
 
(ZoomVideoSDKError- setVideoMask:background:mirror:
 Sets the mask to self video.
 

Detailed Description

The helper to set the video mask.

Definition at line 58 of file ZoomVideoSDKMaskHelper.h.

Method Documentation

◆ generateMask:width:height:

- (UIImage *_Nullable) generateMask: (NSArray< ZoomVideoSDKMaskInfo * > *_Nullable) maskInfos
width: (NSInteger) canvasWidth
height: (NSInteger) canvasHeight 

Generates a mask UIImage based on the mask information that is located within the canvas width or the canvas height. The recommended aspect ratio is 1280 * 720 or 720 * 1280.

Parameters
maskInfosThe mask information used to generate mask.
canvasWidthThe canvas width used to locate the mask information.
canvasHeightThe canvas height used to locate the mask information.
Returns
If the function succeeds, it returns the mask UIImage. Otherwise, this function fails and returns nil.

◆ setVideoMask:background:mirror:

- (ZoomVideoSDKError) setVideoMask: (UIImage *_Nullable) maskImage
background: (UIImage *_Nullable) backgroundImage
mirror: (BOOL) isMirrored 

Sets the mask to self video.

Parameters
maskImageUIImage generated by interface generateMask:width:height:. Or you can generate the bitmap by yourself. This mask image should meet the following conditions: The area through which you want to see the video should be set to opaque and the other areas should be set to transparent.
backgroundImageThe background image.
isMirroredWhether the video that is based on the mask generated is mirrored. For ZoomVideoSDKVideoCanvas, the value ZoomVideoSDKVideoHelper::isMyVideoMirrored can be passed in. For ZoomVideoSDKRawDataPipe, the correct value should be passed.
Returns
If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.