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

Helper class for managing whiteboard functionality in Zoom Video SDK sessions. More...

#include <ZMVideoSDKWhiteboardHelper.h>

Inherits NSObject.

Instance Methods

(ZMVideoSDKErrors- subscribeWhiteboard:
 Displays the whiteboard view when someone is sharing the whiteboard.
 
(ZMVideoSDKErrors- unSubscribeWhiteboard
 Hides the whiteboard sharing view when someone is sharing the whiteboard.
 
(BOOL) - canStartShareWhiteboard
 Checks whether the current user can start whiteboard sharing. Only the host can start whiteboard sharing.
 
(BOOL) - canStopShareWhiteboard
 Checks whether the current user can stop whiteboard sharing.
 
(ZMVideoSDKErrors- setWhiteboardViewPos:
 Set the position of the whiteboard web view window.
 
(ZMVideoSDKErrors- setWhiteboardViewSize:
 Set the size of the whiteboard web view window.
 
(BOOL) - isOtherSharingWhiteboard
 Checks whether another user is currently sharing a whiteboard.
 
(ZMVideoSDKErrors- startShareWhiteboard
 Starts whiteboard sharing in the session.
 
(ZMVideoSDKErrors- stopShareWhiteboard
 Stops whiteboard sharing in the session.
 
(ZMVideoSDKErrors- exportWhiteboard:
 Exports the currently shared whiteboard.
 

Detailed Description

Helper class for managing whiteboard functionality in Zoom Video SDK sessions.

Note
IMPORTANT: To prevent whiteboard data loss, developers must call exportWhiteboard: before the following scenarios:

Definition at line 17 of file ZMVideoSDKWhiteboardHelper.h.

Method Documentation

◆ canStartShareWhiteboard

- (BOOL) canStartShareWhiteboard

Checks whether the current user can start whiteboard sharing. Only the host can start whiteboard sharing.

Returns
YES if the user can start whiteboard sharing, otherwise NO.

◆ canStopShareWhiteboard

- (BOOL) canStopShareWhiteboard

Checks whether the current user can stop whiteboard sharing.

Returns
YES if the user can stop whiteboard sharing, otherwise NO.
Note
This method typically returns YES if the user is currently sharing a whiteboard.

◆ exportWhiteboard:

- (ZMVideoSDKErrors) exportWhiteboard: (ZMVideoSDKExportFormat) format

Exports the currently shared whiteboard.

Parameters
formatThe export format.
Returns
ZMVideoSDKErrors_Success if successful, otherwise an error code.
Note
The exported data is delivered via ZMVideoSDKDelegate::onWhiteboardExported:data:dataLength:. Be sure to implement this callback in your delegate to handle the exported data.
Warning
During the export process (before receiving the ZMVideoSDKDelegate::onWhiteboardExported:data:dataLength: callback), calling stopShareWhiteboard will cause data loss. Wait until the export is complete before stopping the whiteboard share.

◆ isOtherSharingWhiteboard

- (BOOL) isOtherSharingWhiteboard

Checks whether another user is currently sharing a whiteboard.

Returns
YES if another user is sharing a whiteboard, otherwise NO.
Note
This method helps determine if there is active whiteboard content to view.

◆ setWhiteboardViewPos:

- (ZMVideoSDKErrors) setWhiteboardViewPos: (NSPoint) point

Set the position of the whiteboard web view window.

Parameters
pointThe position coordinates (x, y) for the whiteboard window. Use (-1, -1) to center the window on the screen where the owner window is located.
Returns
ZMVideoSDKErrors_Success if successful, otherwise an error code.

◆ setWhiteboardViewSize:

- (ZMVideoSDKErrors) setWhiteboardViewSize: (NSSize) size

Set the size of the whiteboard web view window.

Parameters
sizeThe width and height dimensions for the whiteboard window. Use (0, 0) to use the default window size.
Returns
ZMVideoSDKErrors_Success if successful, otherwise an error code.

◆ startShareWhiteboard

- (ZMVideoSDKErrors) startShareWhiteboard

Starts whiteboard sharing in the session.

Returns
ZMVideoSDKErrors_Success if successful, otherwise an error code.
Note
Ensure that whiteboard sharing is enabled and the user has permission before calling this method. Use canStartShareWhiteboard to check availability first.

◆ stopShareWhiteboard

- (ZMVideoSDKErrors) stopShareWhiteboard

Stops whiteboard sharing in the session.

Returns
ZMVideoSDKErrors_Success if successful, otherwise an error code.
Note
This will stop the whiteboard sharing and hide it from other participants. Use canStopShareWhiteboard to check if stopping is allowed.

◆ subscribeWhiteboard:

- (ZMVideoSDKErrors) subscribeWhiteboard: (NSWindow *) window

Displays the whiteboard view when someone is sharing the whiteboard.

Parameters
windowThe owner window for the whiteboard display. Cannot be nil.
Returns
ZMVideoSDKErrors_Success if successful, otherwise an error code.
Note
Call this method when you want to view a whiteboard that is being shared by another participant.
The whiteboard view should be hidden when whiteboard sharing is stopped, or the user who is sharing the whiteboard leaves session, or the session is failover for ZMVideoSDKErrors_Session_Reconnecting.

◆ unSubscribeWhiteboard

- (ZMVideoSDKErrors) unSubscribeWhiteboard

Hides the whiteboard sharing view when someone is sharing the whiteboard.

Returns
ZMVideoSDKErrors_Success if successful, otherwise an error code.
Note
Call this method when you no longer want to view the shared whiteboard.