Package us.zoom.sdk
Interface ZoomVideoSDKVideoHelper
public interface ZoomVideoSDKVideoHelper
An interface to control video and manage cameras during a video session.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Determine if alpha channel mode can be enabled.boolean
disableMultiStreamVideo
(String cameraDeviceID) Disable the multiple video stream.int
enableAlphaChannelMode
(boolean enable) Enable or disable video alpha channel mode.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.boolean
enableOriginalAspectRatio
(boolean enabled) This function is used to set the aspect ratio of the video sent out.Get the list of camera devices available to share the video.Get the device ID associated with my multi-camera canvas.Get the device ID associated with my multi-camera pipe.int
Get the number of cameras available to share the video.Call this method to get spotlighted video user list.boolean
Determine if alpha channel mode is enabled.boolean
Determines whether the device hardware capabilities are capable of supporting video alpha mode.boolean
Call this method to query if flashlight is on.boolean
Call this method to query mirror my video enable.boolean
Determine whether current aspect ratio is the original aspect ratio of video.boolean
Call this method to query if support flashlight.int
mirrorMyVideo
(boolean enable) Call this method to mirror my video.boolean
muteMultiStreamVideo
(String cameraDeviceID) Turn off the multiple video stream.boolean
rotateMyVideo
(int rotation) Rotate the video when the device is rotated.int
setVideoQualityPreference
(ZoomVideoSDKVideoPreferenceSetting preferenceSetting) Set the video quality preference that automatically adjust user's video to prioritize frame rate v.s.int
Call this method to spotlight user's video.int
Start sending local video data from the camera.int
startVideoCanvasPreview
(ZoomVideoSDKVideoView videoView, ZoomVideoSDKVideoAspect aspect) Subscribe to the current user's video preview with a canvas view.int
Subscribe to the current user's video preview that shows the real-time video output based on his/her outlook and surroundings.int
Stop sending local video data from the camera.int
stopVideoCanvasPreview
(ZoomVideoSDKVideoView videoView) Unsubscribe to the current user's video preview.int
Unsubscribe from the current user's video preview.boolean
Switch to the next available camera.boolean
switchCamera
(ZoomVideoSDKCameraDevice cameraDevice) Switch to a specific camera from the list of camera device retrieved fromgetCameraList()
boolean
turnOnOrOffFlashlight
(boolean isOn) Call this method to turn on or off flashlight.boolean
unmuteMultiStreamVideo
(String cameraDeviceID) Turn on the multiple video stream.int
Call this method to set all user's video unSpotlight.int
Call this method to unSpotlight user's video.
-
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
Switch to a specific camera from the list of camera device retrieved fromgetCameraList()
- 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
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, seeZoomVideoSDKVideoPreferenceSetting
.- Returns:
- errorCode
ZoomVideoSDKErrors
.
-
startVideoPreview
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
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
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
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
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
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
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 seeZoomVideoSDKCameraDevice
.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
Disable the multiple video stream.- Parameters:
cameraDeviceID
- The camera ID that you want to disable. Please seeZoomVideoSDKCameraDevice
.- Returns:
- If the function succeeds, it will return true, otherwise it returns false.
-
muteMultiStreamVideo
Turn off the multiple video stream.- Parameters:
cameraDeviceID
- The camera ID running as a multiple camera. Please seeZoomVideoSDKCameraDevice
.- Returns:
- If the function succeeds, it will return true, otherwise it returns false.
-
unmuteMultiStreamVideo
Turn on the multiple video stream.- Parameters:
cameraDeviceID
- The camera ID running as a multiple camera. Please seeZoomVideoSDKCameraDevice
.- Returns:
- If the function succeeds, it will return true, otherwise it returns false.
-
getDeviceIDByMyPipe
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
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.
-