Video SDK for MacOS API Reference
Loading...
Searching...
No Matches
ZMVideoSDKVideoCanvas Class Reference

Manages the rendering of video or screen share content in the Zoom Video SDK. More...

#include <ZMVideoSDKVideoCanvas.h>

Inherits NSObject.

Instance Methods

(ZMVideoSDKErrors- subscribeWithView:aspectMode:resolution:
 Subscribes to video or share data.
 
(ZMVideoSDKErrors- unSubscribeWithView:
 Unsubscribes to video or share data.
 
(ZMVideoSDKErrors- setAspectMode:aspect:
 Sets the video or share aspect mode.
 
(ZMVideoSDKErrors- setResolution:resolution:
 Sets the resolution.
 
(NSImage *_Nullable) - takeSnapshot:
 Captures a snapshot of the current frame rendered in the specified NSView and returns it as an NSImage.
 

Properties

ZMVideoSDKCanvasType canvasType
 The canvas type.
 

Detailed Description

Manages the rendering of video or screen share content in the Zoom Video SDK.

Definition at line 15 of file ZMVideoSDKVideoCanvas.h.

Method Documentation

◆ setAspectMode:aspect:

- (ZMVideoSDKErrors) setAspectMode: (NSView *_Nonnull) view
aspect: (ZMVideoSDKVideoAspect) aspect 

Sets the video or share aspect mode.

Parameters
viewThe NSView object, needed to render video or share.
aspectThe aspect ratio of the video or share.
Returns
If the function succeeds, it returns ZMVideoSDKErrors_Success. Otherwise, this function returns an error.

◆ setResolution:resolution:

- (ZMVideoSDKErrors) setResolution: (NSView *_Nonnull) view
resolution: (ZMVideoSDKResolution) resolution 

Sets the resolution.

Parameters
viewThe NSView object, needed to render video.
resolutionThe video's resolution.
Returns
If the function succeeds, it returns ZMVideoSDKErrors_Success. Otherwise, this function returns an error.
Warning
Avaliable only for subscribe video, unavaliable for subscribe sharing.

◆ subscribeWithView:aspectMode:resolution:

- (ZMVideoSDKErrors) subscribeWithView: (NSView *_Nonnull) view
aspectMode: (ZMVideoSDKVideoAspect) aspect
resolution: (ZMVideoSDKResolution) resolution 

Subscribes to video or share data.

Parameters
viewThe NSView object, needed to render video or share.
aspectThe aspect ratio of the video or share.
resolutionSpecified the resolution of video. valid only for subscribe video.
Returns
If the function succeeds, it returns ZMVideoSDKErrors_Success. Otherwise, this function returns an error.

◆ takeSnapshot:

- (NSImage *_Nullable) takeSnapshot: (NSView *) view

Captures a snapshot of the current frame rendered in the specified NSView and returns it as an NSImage.

Parameters
viewThe NSView object displaying the video or share content.
Returns
An NSImage containing the captured frame, or nil if the snapshot could not be taken.

◆ unSubscribeWithView:

- (ZMVideoSDKErrors) unSubscribeWithView: (NSView *_Nonnull) view

Unsubscribes to video or share data.

Parameters
viewThe NSView object, needed to render video or share.
Returns
If the function succeeds, it returns ZMVideoSDKErrors_Success. Otherwise, this function returns an error.

Property Documentation

◆ canvasType

- (ZMVideoSDKCanvasType) canvasType
readnonatomicassign

The canvas type.

Definition at line 19 of file ZMVideoSDKVideoCanvas.h.