Interface
ZegoCursorAttribute
Description: The custom cursor can be personalized.
Properties
iconPath
iconPath: string | File Cursor path, you can enter network pictures or upload icon files locally.
offsetX
offsetX: number - Required: Yes
Example: If you want to set the mouse action point at the upper left corner of the icon, set the X axis to 0.
- Value range: 0~32.
Platform difference: Please refer to https://developer.mozilla.org/zh-CN/docs/Web/CSS/cursor#specifications for the attribute platform difference.
offsetY
offsetY: number - Required: Yes
Example: If you want to set the mouse action point at the upper left corner of the icon, set the Y axis to 0.
- Value range: 0~32.
Platform difference: Please refer to https://developer.mozilla.org/zh-CN/docs/Web/CSS/cursor#specifications for the attribute platform difference.
titleStyle
titleStyle: ZegoSuperBoardCursorTitleStyle - Default value: Refer to ZegoCursorTitleStyle class Supported version: v2.13.0
ZegoEvent
ZegoSuperBoard SDK callback event collection
Properties
error
remoteSuperBoardSubViewAdded
remoteSuperBoardSubViewAdded: remoteSuperBoardSubViewAddedCallback Listen to the peer to create a subView and return the uniqueID of the subView created by the peer
Notification timing: After the subView is successfully created, other users in the same room will receive the corresponding notification in the [remoteSuperBoardSubViewAdded] callback.
remoteSuperBoardSubViewRemoved
remoteSuperBoardSubViewRemoved: remoteSuperBoardSubViewRemovedCallback The monitoring peer deletes the subView and returns the uniqueID of the deleted subView from the peer.
Notification timing: After creating and deleting the subView, other users in the same room will receive the corresponding notification in the [remoteSuperBoardSubViewRemoved] callback.
remoteSuperBoardSubViewSwitched
remoteSuperBoardSubViewSwitched: remoteSuperBoardSubViewSwitchedCallback monitor the peer switch subView and return the uniqueID of the subView switched by the peer.
Notification timing: After the subView is successfully switched, other users in the same room will receive the corresponding notification in the [remoteSuperBoardSubViewSwitched] callback.
remoteSuperBoardAuthChanged
remoteSuperBoardAuthChanged: remoteSuperBoardAuthChangedCallback monitor whiteboard permission changes
Notification timing: When the permission change occurs, users who are already in the same room will receive a corresponding notification in the [remoteSuperBoardAuthChanged] callback.
remoteSuperBoardGraphicAuthChanged
remoteSuperBoardGraphicAuthChanged: remoteSuperBoardGraphicAuthChangedCallback Monitor the changes of primitive permissions, [create, erase, move, edit, clear] permission objects
Notification timing: When the permission change occurs, users who are already in the same room will receive a corresponding notification in the [remoteSuperBoardGraphicAuthChanged] callback.
superBoardSubViewScaleChanged
superBoardSubViewScaleChanged: superBoardSubViewScaleChangedCallback monitor the zooming subView, and return the uniqueID and zoom factor of the zoomed subView.
Notification timing: After the subView is successfully zoomed, users in the same room will receive the corresponding notification in the [superBoardSubViewScaleChanged] callback.
superBoardSubViewScrollChanged
superBoardSubViewScrollChanged: superBoardSubViewScrollChangedCallback Monitor the scrolling/page-turning subView, return the uniqueID of the scrolling/page-turning subView, the page number, and the number of steps of the dynamic PPT type file
Notification timing: After the subView is successfully scaled, users in the same room will receive the corresponding notification in the [superBoardSubViewScrollChanged] callback.
cacheFile
cacheFile: cacheFileCallback Details: After calling the cacheFile interface, the status of the cache file process will be displayed through this callback. Business scenario: cache files locally. Callback time: after calling the cacheFile interface.
uploadFile
uploadFile: uploadFileCallback Details: listen to file upload, return file upload status, error code, seq, upload progress, file ID information Notification timing: After the file is uploaded successfully, all users in the same room will receive the corresponding notification in the [uploadFile] callback.
uploadH5File
uploadH5File: uploadH5FileCallback Details: listen to H5 file upload, return file upload status, error code, seq, upload progress, file ID information Notification timing: After the file is uploaded successfully, all users in the same room will receive the corresponding notification in the [uploadH5File] callback.
superBoardSubViewMediaPermission
superBoardSubViewMediaPermission: superBoardSubViewMediaPermissionCallback The callback triggered when the passive end cannot play audio and video due to browser limitations is generally used in conjunction with PlayMedia to pass the information returned by the callback to PlayMedia.
Methods
cacheFileCallback
cacheFileCallback(state: ZegoSuperBoardCacheFileState, errorCode: number, seq: number, percent: number, fileID: string): voidParameters
| Name | Type | Description |
|---|---|---|
| state | ZegoSuperBoardCacheFileState | File caching is divided into two stages: Caching and Cached. |
| errorCode | number | The callback error code of the current stage, 0 means successful execution |
| seq | number | seq is an integer, which is the identifier returned by the server when the interface is called, and is used to distinguish different files that are being cached. This parameter is only used when the user caches multiple files at the same time. |
| percent | number | Cache progress |
| fileID | string | ID of cache file |
- Caution: Valid only when the cache file type is static
errorCallback
errorCallback(error: ZegoSuperBoardError): void| Name | Type | Description |
|---|---|---|
| error | ZegoSuperBoardError | Error message |
remoteSuperBoardAuthChangedCallback
remoteSuperBoardAuthChangedCallback(data: Record<string, number>): void| Name | Type | Description |
|---|---|---|
| data | Record<string, number> | Return to the target of whiteboard permission change Note: {scale:0, scroll:1} |
remoteSuperBoardGraphicAuthChangedCallback
remoteSuperBoardGraphicAuthChangedCallback(data: Record<string, number>): void| Name | Type | Description |
|---|---|---|
| data | Record<string, number> | Return to the object of the change of the entity's permission Note: {create:1, delete:1, move:1, update:1, clear:0} |
remoteSuperBoardSubViewAddedCallback
remoteSuperBoardSubViewAddedCallback(name: string, createTime: number, fileID: string, fileType: ZegoSuperBoardFileType, uniqueID: string, whiteboardIDList: array): void| Name | Type | Description |
|---|---|---|
| name | string | Name of SuperBoardSubView |
| createTime | number | Creation Time |
| fileID | string | File ID |
| fileType | ZegoSuperBoardFileType | File type, refer to ZegoSuperBoardFileType |
| uniqueID | string | SuperBoardSubview ID, This ID is unique |
| whiteboardIDList | array | A list of whiteboard IDs |
remoteSuperBoardSubViewRemovedCallback
remoteSuperBoardSubViewRemovedCallback(uniqueID: string): void| Name | Type | Description |
|---|---|---|
| uniqueID | string | Return the uniqueID of the deleted subView |
remoteSuperBoardSubViewRemovedCallback
remoteSuperBoardSubViewRemovedCallback(name: string, createTime: number, fileID: string, fileType: ZegoSuperBoardFileType, uniqueID: string, whiteboardIDList: array): void| Name | Type | Description |
|---|---|---|
| name | string | Name of SuperBoardSubView |
| createTime | number | Creation Time |
| fileID | string | File ID |
| fileType | ZegoSuperBoardFileType | File type, refer to ZegoSuperBoardFileType |
| uniqueID | string | SuperBoardSubview ID, This ID is unique |
| whiteboardIDList | array | A list of whiteboard IDs |
remoteSuperBoardSubViewSwitchedCallback
remoteSuperBoardSubViewSwitchedCallback(uniqueID: string): void| Name | Type | Description |
|---|---|---|
| uniqueID | string | Return the uniqueID of the switch subView |
remoteSuperBoardSubViewSwitchedCallback
remoteSuperBoardSubViewSwitchedCallback(uniqueID: string): void| Name | Type | Description |
|---|---|---|
| uniqueID | string | SuperBoardSubview ID, This ID is unique |
superBoardSubViewScaleChangedCallback
superBoardSubViewScaleChangedCallback(name: string, createTime: number, fileID: string, fileType: ZegoSuperBoardFileType, uniqueID: string, whiteboardIDList: array, scaleFactor: number, scaleOffsetX: number, scaleOffsetY: number): void| Name | Type | Description |
|---|---|---|
| name | string | Name of SuperBoardSubView |
| createTime | number | Creation Time |
| fileID | string | File ID |
| fileType | ZegoSuperBoardFileType | File type, refer to ZegoSuperBoardFileType |
| uniqueID | string | SuperBoardSubview ID, This ID is unique |
| whiteboardIDList | array | A list of whiteboard IDs |
| scaleFactor | number | Scale factor |
| scaleOffsetX | number | Offset in X direction after scaling |
| scaleOffsetY | number | Offset in Y direction after scaling |
superBoardSubViewScrollChangedCallback
superBoardSubViewScrollChangedCallback(uniqueID: string, page: number, step: number): void| Name | Type | Description |
|---|---|---|
| uniqueID | string | return the uniqueID of the subView |
| page | number | return the page of the subView |
| step | number | The number of steps for dynamic PPT files |
superBoardSubViewScrollChangedCallback
superBoardSubViewScrollChangedCallback(name: string, createTime: number, fileID: string, fileType: ZegoSuperBoardFileType, uniqueID: string, whiteboardIDList: array, currentPage: number, pageCount: number): void| Name | Type | Description |
|---|---|---|
| name | string | Name of SuperBoardSubView |
| createTime | number | Creation Time |
| fileID | string | File ID |
| fileType | ZegoSuperBoardFileType | File type, refer to ZegoSuperBoardFileType |
| uniqueID | string | SuperBoardSubview ID, This ID is unique |
| whiteboardIDList | array | A list of whiteboard IDs |
| currentPage | number | current page |
| pageCount | number | total page |
uploadFileCallback
uploadFileCallback(state: ZegoSuperBoardUploadFileState, errorCode: number, seq: number, upload_percent: number, fileID: string): void| Name | Type | Description |
|---|---|---|
| state | ZegoSuperBoardUploadFileState | File upload is divided into two stages: upload and format conversion |
| errorCode | number | The callback error code of the current stage, 0 means successful execution |
| seq | number | seq is an integer, which is the identifier returned by the server when the interface is called, and is used to distinguish different files that are being cached. This parameter is only used when the user caches multiple files at the same time. |
| upload_percent | number | upload progress |
| fileID | string | ID of cache file |
uploadH5FileCallback
uploadH5FileCallback(state: ZegoSuperBoardUploadFileState, errorCode: number, seq: number, upload_percent: number, fileID: string): void| Name | Type | Description |
|---|---|---|
| state | ZegoSuperBoardUploadFileState | File upload is divided into two stages: upload and format conversion |
| errorCode | number | The callback error code of the current stage, 0 means successful execution |
| seq | number | seq is an integer, which is the identifier returned by the server when the interface is called, and is used to distinguish different files that are being cached. This parameter is only used when the user caches multiple files at the same time. |
| upload_percent | number | upload progress |
| fileID | string | ID of cache file |
ZegoSuperBoardCacheFileCallBack
Preload static file progress callback
- Caution: Valid only when the cache file type is static
Properties
data
ZegoSuperBoardDynamicCacheModel
About the relevant parameters returned by dynamic file calling cachefile method
Details
Return only if the preload file type is a dynamic file
- Caution: This return field is about to be discarded
Properties
totalFileNum
totalFileNum: number Total resources of this file
failedFileNum
failedFileNum: number The number of failed pre request resources for this file
ZegoSuperBoardErrorData
Error callback
Properties
code
msg
msg: string error message
ZegoSuperBoardStaticCacheModel
About the relevant parameters returned by the callback generated by the static file calling the cachel method
- Caution: This callback returns only when the preload file type is a static file
Properties
seq
seq: number The SEQ corresponding to the cache file, such as required when calling cancel cache
state
state: CacheState Current cache state of file
totalFileNum
totalFileNum: number Total resources of this file
failedFileNum
failedFileNum: number The number of failed pre request resources for this file
loadedFileNum
loadedFileNum: number ca
ZegoSuperBoardUploadCallback
Upload progress and result callback
Properties
data
data: ZegoSuperBoardUploadModel Parameters returned by the upload file generation callback
ZegoSuperBoardUploadH5FileCallback
Callback generated by uploading a custom H5 file
Properties
data
data: ZegoSuperBoardUploadModel Parameters returned by the upload file generation callback
ZegoWhiteboardScaleModel
Zoom information
Properties
scaleFactor
scaleFactor: number Current zoom factor
scaleOffsetX
scaleOffsetX: number Offset in X direction after scaling
scaleOffsetY
scaleOffsetY: number Y-direction offset after scaling
loadOptions
Load file configuration
Details
this configuration can be used to configure the loading of files, such as the loading callback timing to trigger dynamic ppt
- Caution: pay attention to the effective conditions of each configuration. Some configuration items may only be effective for certain types of files.
Properties
PPTReady
PPTReady: boolean set the trigger time of the callback method for loading dynamic files. Usually, the callback is triggered immediately after the information about the loaded file is obtained from the file server.
- Use cases: get the ready status of loading dynamic ppt files.
- Required: No.
- Default value: false, triggered immediately after the file information is obtained from the file server by default.
- Caution: This parameter is only valid for dynamic ppt files.
uploadOptions
Upload file configuration items
Details
Transcoding configuration for the uploaded file
Properties
renderImgType
renderImgType: RenderImgType For the static file type to take effect, different parameters can be configured to transcode to the corresponding image format type
~
Reload configuration items
Details
this configuration can be used to configure the loading of files, such as the loading callback timing to trigger dynamic ppt
Supported Versions: 2.7.1 and later
Properties
forceReload
forceReload: boolean Set whether to force refresh.
- Use cases: When the rendering of the file on some iOS mobile devices is abnormal, execute this API to reload the file.
- Required: YES.
reloadType
reloadType: reloadType This configuration can be configured for the scope of the release canvas
- Required: YES.
