Package us.zoom.sdk

Interface ZoomVideoSDKMaskHelper


public interface ZoomVideoSDKMaskHelper
The helper to set the video mask.
  • 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 with generateMask(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. For ZoomVideoSDKVideoCanvas, the value ZoomVideoSDKVideoHelper.isMyVideoMirrored() can be passed in. For ZoomVideoSDKRawDataPipe, the correct value should be passed.
      Returns:
      errorCode ZoomVideoSDKErrors.