The video canvas is the display area of the video streams on the user’s local device. To instantiate a local video canvas instance and show the video stream of a user, simply initialize the ZoomVideoSDKVideoCanvas object, subscribe the userId of a specific user, and add it to your UIView.
More...
#include <ZoomVideoSDKVideoCanvas.h>
Inherits NSObject.
The video canvas is the display area of the video streams on the user’s local device. To instantiate a local video canvas instance and show the video stream of a user, simply initialize the ZoomVideoSDKVideoCanvas object, subscribe the userId of a specific user, and add it to your UIView.
Definition at line 12 of file ZoomVideoSDKVideoCanvas.h.
◆ canvasType
Gets the canvas type.
- Returns
- If the function succeeds, it returns the canvas type. Otherwise, this function returns an error.
◆ setAspectMode:toView:
Sets the video aspect mode.
- Parameters
-
| aspect | The aspect mode of video. |
| view | The UIView object to render video. |
- Returns
- If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.
◆ setResolution:toView:
Sets the video resolution.
- Parameters
-
| resolution | The video resolution. Valid only for video canvas. |
| view | The UIView object to render video. |
- Returns
- If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.
◆ shareStatus
◆ subscribeWithPiPView:aspectMode:andResolution:
Subscribes to the user's video or share view in Picture-in-Picture mode for video calls.
- Parameters
-
| view | The UIView object that you need to render data. |
| aspect | The render's aspect mode. |
| resolution | The render's resolution. Valid only for video canvas. |
- Returns
- If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.
- Note
- To know more about PiP mode for video calls, please visit https://developer.apple.com/documentation/avkit/adopting_picture_in_picture_for_video_calls.
◆ subscribeWithView:aspectMode:andResolution:
Subscribes to the user's video or share view.
- Parameters
-
| view | The UIView object that you need to render data. |
| aspect | The render's aspect mode. |
| resolution | The render's resolution. Valid only for video canvas. |
- Returns
- If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.
◆ takeSnapshot:
| - (UIImage *_Nullable) takeSnapshot: |
|
(UIView *_Nullable) | view |
|
Captures a snapshot of the current video frame from the specified UIView and returns it as a UIImage. This method captures the current frame being displayed in the video or share canvas.
- Parameters
-
| view | The UIView currently subscribed to this canvas. |
- Returns
- A UIImage containing the captured frame, or nil if the snapshot could not be taken. The returned image will be autoreleased.
- Note
- The view must be currently subscribed to this canvas; otherwise the method returns nil.
-
After taking a snapshot, a notification is sent to other users in the session via the onCanvasSnapshotTaken callback.
◆ unSubscribeWithView:
Unsubscribes from video or share data.
- Parameters
-
| view | The UIView object to unsubscribe. |
- Returns
- If the function succeeds, it returns Errors_Success. Otherwise, this function returns an error.
◆ videoStatus