Package us.zoom.sdk
Interface ZoomVideoSDKMaskHelper
public interface ZoomVideoSDKMaskHelper
The helper to set the video mask.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classThe circle mask information.static classThe mask info to generate the mask bitmap.static classThe oval mask information.static classThe rectangle mask information.static enumThe mask shape. -
Method Summary
Modifier and TypeMethodDescriptionandroid.graphics.BitmapgenerateMask(ArrayList<ZoomVideoSDKMaskHelper.MaskInfo> maskInfos, int canvasWidth, int canvasHeight) Generate a mask based on the mask information that is located within the canvas width or the canvas height.intsetVideoMask(android.graphics.Bitmap mask, android.graphics.Bitmap background, boolean isMirrored) Set the mask to self video.
-
Method Details
-
generateMask
android.graphics.Bitmap generateMask(ArrayList<ZoomVideoSDKMaskHelper.MaskInfo> maskInfos, int canvasWidth, int canvasHeight) Generate a mask 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 * 12880.- Parameters:
maskInfos- The mask information list used to generate the mask.canvasWidth- The canvas width used to locate the mask information.canvasHeight- The canvas height used to locate the mask information.- Returns:
- The mask bitmap.
-
setVideoMask
int setVideoMask(android.graphics.Bitmap mask, android.graphics.Bitmap background, boolean isMirrored) Set the mask to self video.- Parameters:
mask- The bitmap to mask the video. The bitmap can be generated withgenerateMask(ArrayList, int, int)or you can generate the bitmap by yourself. This bitmap mask 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.background- The background bitmap when the video is masked.isMirrored- Whether the video that is based by the mask generate is mirrored. ForZoomVideoSDKVideoCanvas, the valueZoomVideoSDKVideoHelper.isMyVideoMirrored()can be passed in. ForZoomVideoSDKRawDataPipe, the correct value should be passed.- Returns:
- errorCode
ZoomVideoSDKErrors.
-