Package us.zoom.sdk

Interface ZoomVideoSDKVideoHelper


public interface ZoomVideoSDKVideoHelper
An interface to control video and manage cameras during a video session.

See ZoomVideoSDK.getVideoHelper()

  • Method Details

    • startVideo

      int startVideo()
      Start sending local video data from the camera.
      Returns:
      If the function succeeds, the return value is Errors_Success. Otherwise, this function returns an error. To get extended error information, see ZoomVideoSDKErrors.
    • stopVideo

      int stopVideo()
      Stop sending local video data from the camera.
      Returns:
      If the function succeeds, the return value is Errors_Success. Otherwise, this function returns an error. To get extended error information, see ZoomVideoSDKErrors.
    • rotateMyVideo

      boolean rotateMyVideo(int rotation)
      Rotate the video when the device is rotated. This happens during the device onConfigurationChanged or onResume within Activity. For more information regarding onConfigurationChanged, see https://developer.android.com/reference/android/app/Activity#onConfigurationChanged(android.content.res.Configuration). For more information regarding onResume, see https://developer.android.com/reference/android/app/Activity#onResume().
      Parameters:
      rotation - This should be the value returned from android.view.Display.getRotation().
      Returns:
      true if the rotation was successful. Otherwise, this function returns false.
    • switchCamera

      boolean switchCamera()
      Switch to the next available camera.
      Returns:
      true if the switch to the next camera was successful. Otherwise, this function returns false.
    • switchCamera

      boolean switchCamera(ZoomVideoSDKCameraDevice cameraDevice)
      Switch to a specific camera from the list of camera device retrieved from getCameraList()
      Parameters:
      cameraDevice - ZoomVideoSDKCameraDevice
      Returns:
      true if the switch to the specific camera was successful. Otherwise, this function returns false.
    • getNumberOfCameras

      int getNumberOfCameras()
      Get the number of cameras available to share the video.
      Returns:
      Number of cameras.
    • getCameraList

      List<ZoomVideoSDKCameraDevice> getCameraList()
      Get the list of camera devices available to share the video.
      Returns:
      List of devices. See ZoomVideoSDKCameraDevice.
    • setVideoQualityPreference

      int setVideoQualityPreference(ZoomVideoSDKVideoPreferenceSetting preferenceSetting)
      Set the video quality preference that automatically adjust user's video to prioritize frame rate v.s. resolution based on the current bandwidth available.
      Parameters:
      preferenceSetting - Specifies the video quality preference. For more information, see ZoomVideoSDKVideoPreferenceSetting.
      Returns:
      errorCode ZoomVideoSDKErrors.
    • startVideoPreview

      int startVideoPreview(ZoomVideoSDKRawDataPipeDelegate delegate)
      Subscribe to the current user's video preview that shows the real-time video output based on his/her outlook and surroundings.
      Parameters:
      delegate - ZoomVideoSDKRawDataPipeDelegate
      Returns:
      If the function succeeds, the return value is Errors_Success. Otherwise, this function returns an error. To get extended error information, see ZoomVideoSDKErrors.
    • stopVideoPreview

      int stopVideoPreview(ZoomVideoSDKRawDataPipeDelegate delegate)
      Unsubscribe from the current user's video preview.
      Parameters:
      delegate - ZoomVideoSDKRawDataPipeDelegate
      Returns:
      If the function succeeds, the return value is Errors_Success. Otherwise, this function returns an error. To get extended error information, see ZoomVideoSDKErrors.
    • startVideoCanvasPreview

      int startVideoCanvasPreview(ZoomVideoSDKVideoView videoView, ZoomVideoSDKVideoAspect aspect)
      Subscribe to the current user's video preview with a canvas view.
      Parameters:
      videoView - ZoomVideoSDKVideoView
      Returns:
      If the function succeeds, the return value is Errors_Success. Otherwise, this function returns an error. To get extended error information, see ZoomVideoSDKErrors.
    • stopVideoCanvasPreview

      int stopVideoCanvasPreview(ZoomVideoSDKVideoView videoView)
      Unsubscribe to the current user's video preview.
      Parameters:
      videoView - ZoomVideoSDKVideoView
      Returns:
      If the function succeeds, the return value is Errors_Success. Otherwise, this function returns an error. To get extended error information, see ZoomVideoSDKErrors.
    • isOriginalAspectRatioEnabled

      boolean isOriginalAspectRatioEnabled()
      Determine whether current aspect ratio is the original aspect ratio of video.
      Returns:
      if is original aspect ratio, otherwise false.
    • enableOriginalAspectRatio

      boolean enableOriginalAspectRatio(boolean enabled)
      This function is used to set the aspect ratio of the video sent out.
      Parameters:
      enabled - false means the aspect ratio is 16:9, true means that using the original aspect ratio of video
      Returns:
      true if successful, otherwise false Remark: If session is using video source and data_mode is not VideoSourceDataMode_None, default always use original aspect ration of video.
    • mirrorMyVideo

      int mirrorMyVideo(boolean enable)
      Call this method to mirror my video.
      Parameters:
      enable - true mirror my video,false disable mirror
      Returns:
      Returns ret ZoomVideoSDKErrors
    • isMyVideoMirrored

      boolean isMyVideoMirrored()
      Call this method to query mirror my video enable.
      Returns:
      true if the mirror effect enabled, false otherwise.
    • turnOnOrOffFlashlight

      boolean turnOnOrOffFlashlight(boolean isOn)
      Call this method to turn on or off flashlight. Prerequisite: The camera is in an open state If the camera is closed, it will return false. If you want to enable the flash light when the camera is closed, you can use android.hardware.camera2 or android.hardware.camera (deprecated).
      Parameters:
      isOn - true turn on my flashlight, false turn off my flashlight
      Returns:
      true if successful, otherwise false.
    • isSupportFlashlight

      boolean isSupportFlashlight()
      Call this method to query if support flashlight.
      Returns:
      true the flashlight support, false otherwise.
    • isFlashlightOn

      boolean isFlashlightOn()
      Call this method to query if flashlight is on. Prerequisite: The camera is in an open state If the camera is closed, it will return false. If you want to get the flash light status when the camera is closed, you can use android.hardware.camera2 or android.hardware.camera (deprecated).
      Returns:
      true the flashlight is on, false otherwise.
    • canEnableAlphaChannelMode

      boolean canEnableAlphaChannelMode()
      Determine if alpha channel mode can be enabled.
      Returns:
      true means it can be enabled. Otherwise false. Remark: Only host can enable the alpha mode. Your account must have this feature turned on by Support.
    • enableAlphaChannelMode

      int enableAlphaChannelMode(boolean enable)
      Enable or disable video alpha channel mode.
      Parameters:
      enable - true indicates enable alpha channel mode. Otherwise, disable it.
      Returns:
      If the function succeeds, the return value is SDKErr_Success. Otherwise it failed. To get extended error information, see ZoomVideoSDKErrors.
    • isAlphaChannelModeEnabled

      boolean isAlphaChannelModeEnabled()
      Determine if alpha channel mode is enabled.
      Returns:
      true indicates alpha channel mode is enabled. Otherwise false.
    • isDeviceSupportAlphaChannelMode

      boolean isDeviceSupportAlphaChannelMode()
      Determines whether the device hardware capabilities are capable of supporting video alpha mode.
      Returns:
      true indicates that current device supports it. Otherwise, it indicates that the device performance is weak and does not support it.
    • spotLightVideo

      int spotLightVideo(ZoomVideoSDKUser user)
      Call this method to spotlight user's video.
      Parameters:
      user - The 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 ZoomVideoSDKErrors.
    • unSpotLightVideo

      int unSpotLightVideo(ZoomVideoSDKUser user)
      Call this method to unSpotlight user's video.
      Parameters:
      user - The 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 ZoomVideoSDKErrors.
    • unSpotlightAllVideos

      int 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 ZoomVideoSDKErrors.
    • getSpotlightedVideoUserList

      List<ZoomVideoSDKUser> getSpotlightedVideoUserList()
      Call this method to get spotlighted video user list.
      Returns:
      If the function succeeds, the return value is a list of spotlighted user. Otherwise failed. the return value is NULL.
    • enableMultiStreamVideo

      boolean enableMultiStreamVideo(String cameraDeviceID, String customDeviceName)
      Enable multiple video stream support if you have multiple cameras and other participants can see multiple videos of you. Note: Only two cameras be supported to open same time.
      Parameters:
      cameraDeviceID - The camera ID for the camera to enable. Please see ZoomVideoSDKCameraDevice.
      customDeviceName - The 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 true, otherwise it returns false.
    • disableMultiStreamVideo

      boolean disableMultiStreamVideo(String cameraDeviceID)
      Disable the multiple video stream.
      Parameters:
      cameraDeviceID - The camera ID that you want to disable. Please see ZoomVideoSDKCameraDevice.
      Returns:
      If the function succeeds, it will return true, otherwise it returns false.
    • muteMultiStreamVideo

      boolean muteMultiStreamVideo(String cameraDeviceID)
      Turn off the multiple video stream.
      Parameters:
      cameraDeviceID - The camera ID running as a multiple camera. Please see ZoomVideoSDKCameraDevice.
      Returns:
      If the function succeeds, it will return true, otherwise it returns false.
    • unmuteMultiStreamVideo

      boolean unmuteMultiStreamVideo(String cameraDeviceID)
      Turn on the multiple video stream.
      Parameters:
      cameraDeviceID - The camera ID running as a multiple camera. Please see ZoomVideoSDKCameraDevice.
      Returns:
      If the function succeeds, it will return true, otherwise it returns false.
    • getDeviceIDByMyPipe

      String getDeviceIDByMyPipe(ZoomVideoSDKRawDataPipe pipe)
      Get the device ID associated with my multi-camera pipe.
      Parameters:
      pipe - One of my multi-camera pipes.
      Returns:
      The video device ID if successful. Otherwise it returns null.
    • getDeviceIDByMyCanvas

      String getDeviceIDByMyCanvas(ZoomVideoSDKVideoCanvas canvas)
      Get the device ID associated with my multi-camera canvas.
      Parameters:
      canvas - canvas One of my multi-camera canvases.
      Returns:
      The video device ID if successful. Otherwise it returns null.