logo
Super Board
On this page

Class

2026-01-23
ZegoCreateFileConfigZegoCreateWhiteboardConfig
ZegoSuperBoardApiCalledCallbackModelZegoSuperBoardCursorAttribute
ZegoSuperboardCustomH5ConfigZegoSuperBoardInitConfig
ZegoSuperBoardManagerZegoSuperBoardQueryListCallbackModel
ZegoSuperBoardSubViewZegoSuperBoardSubViewModel
ZegoSuperBoardViewZegoSuperBoardViewCreatedCallbackModel

ZegoCreateFileConfig

Details

The interface parameters are used to construct the class, passing in the parameters needed to create the file.

  • Use cases: The createFileView interface is needed in the call.

Properties

fileID

fileID
fileID: string

ID of the file

Required or not: Mandatory

  • Available since: v2.0.0

ZegoCreateWhiteboardConfig

Details

The interface parameters are used to construct the class with the parameters that are passed in to create the whiteboard.

  • Use cases: In the call to createWhiteboardView the interface is passed in.

Properties

name

name
name: string

Create whiteboard Is the name of the whiteboard to be set.

Required or not: Mandatory

Value range value can contain 128 bytes and can be in Both Chinese and English.

  • Available since: v2.0.0

perPageWidth

perPageWidth
perPageWidth: number

Width of each whiteboard page.

Required or not: Mandatory

  • Value range: Positive integer greater than 0.
  • Available since: 2.0.0及以上

perPageHeight

perPageHeight
perPageHeight: number

Height of each whiteboard page.

Required or not: Mandatory

  • Value range: Positive integer greater than 0.
  • Available since: v2.0.0

pageCount

pageCount
pageCount: number

Total number of pages。

Required or not: Mandatory

  • Value range: Greater than 0.
  • Available since: v2.0.0

ZegoSuperBoardApiCalledCallbackModel

Details

After calling some interfaces of ZegoSuperBoardManager and ZegoSuperBoardSubView, the calling result of this interface will be called back through the general callback interface.

  • Use cases: After calling the ZegoSuperBoardManager and ZegoSuperBoardSubView interfaces, judge whether the interface call is successful.

Properties

errorCode

errorCode

Error code, 0 means success

ZegoSuperBoardCursorAttribute

Details

Detailed description: The interface parameter construction class uses the parameters required by the incoming cursor style.

Business scenario: It needs to be passed when calling the [setCustomCursorAttribute:cursorAttribute:complete:] interface.

Properties

iconPath

iconPath
iconPath: string
  • Default value: Supported version: v2.4.0

offsetX

offsetX
offsetX: number
  • Default value: 0 Supported version: v2.4.0

offsetY

offsetY
offsetY: number
  • Default value: 18 Supported version: v2.4.0

titleStyle

titleStyle
titleStyle: ZegoSuperBoardCursorTitleStyle
  • Default value: Refer to ZegoSuperBoardCursorTitleStyle class Supported version: v2.4.0

ZegoSuperBoardInitConfig

Details

The interface parameters are used to construct the class, and the parameters needed to initialize the SDK are initialized with the constructs.

  • Use cases: The init SDK interface initWithConfig needs to be passed in.

Properties

appID

appID
appID: number

ZEGO application ID for developers, please apply from ZEGO management console.

Required or not: Mandatory

Reference range: 0-4294967295.

token

token
token: string

The login verification token is obtained by registering the project in the instant console to obtain the key plus the specified algorithm. The test phase can be obtained through the interface provided by ZEGO, and the formal environment must be implemented by the user.

userID

userID
userID: string

User ID, please do not fill in sensitive user information in this field, including but not limited to mobile phone number, ID number, passport number, real name, etc.

appSign

appSign
appSign: string
  • Value range: Detailed description: Value range: '0' ~ '9', 'a' ~ 'z'. Example: "9dc9a25bh2f2137446897071c8c033fa33b91c3dd2a85e0c000ae82c0dad3". Version 2.3.0 and above appSign allows to pass blank or no pass. If it is empty or not passed, you can pass the token for initialization.please refer to Using Token Authentication.

cacheFolder

cacheFolder
cacheFolder: string

cache directory

logFolder

logFolder
logFolder: string

log directory

ZegoSuperBoardManager

Details

Interface class, SDK initialization, global function Settings in the room, create files or pure whiteboard, etc.

  • Use cases: It is used to initialize the SDK, set some whiteboard tools, zoom synchronization, and brush effects, obtain boardView, and create pure whiteboard and files when the boardView mode is enabled.
  • Platform differences: There is no

Properties

enableCustomCursor

enableCustomCursor
enableCustomCursor: boolean

Detailed description: Set whether to enable custom cursor, set to true to display the cursor. The default is true

Business scenario: the cursor function is displayed during the graffiti process.

Timing of calling: After initializing the SDK.

Supported version: v2.2.0

enableRemoteCursorVisible

enableRemoteCursorVisible
enableRemoteCursorVisible: boolean

Detailed description: Set whether to display the remote cursor or not, set to true to display the remote cursor. The default is true.

Business scenario: display the remote cursor function during the graffiti process.

Timing of calling: After initializing the SDK.

Supported version: v2.2.0

superBoardMaxScaleFactor

superBoardMaxScaleFactor
superBoardMaxScaleFactor: ~

Method description: Set the maximum zoom factor of Super Whiteboard (file and whiteboard), which is 3x by default. The range that can be set is [1,10] Call timing: After initialization, before creating the file/whiteboard, and after unInit expires.

forceReload

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: reloadType

This configuration can be configured for the scope of the release canvas

  • Required: YES.

Methods

setSuperBoardMaxScaleFactor

setSuperBoardMaxScaleFactor
setSuperBoardMaxScaleFactor(scaleFactor: Float): void
Set the maximum zoom factor of Super Whiteboard (file and whiteboard), which is 3x by default. The range that can be set is [1,10]

Parameters

NameTypeDescription
scaleFactorFloatDescription
maximum zoom factor of Super Whiteboard (file and whiteboard)

Details

Set the maximum zoom factor of Super Whiteboard (file and whiteboard), which is 3x by default. The range that can be set is [1,10]

  • When to call /Trigger: After initialization, before creating the file/whiteboard, and after unInit expires.
  • Available since: 2.3.7

clearLog

clearLog
clearLog(): Promise<{ code: number }>
Upload and clear the local cache log

Upload and clear the local cache log

  • Available since: 2.4.0

Operation results

enableCustomCursor

enableCustomCursor
enableCustomCursor(enable: boolean): void

Parameters

NameTypeDescription
enablebooleanWhether to open

Details

Detailed description: Set whether to use a custom cursor for whiteboard graffiti, set it to true to set the cursor to a custom picture.

Required or not: Yes.

Call timing: After the SDK is initialized.

enableRemoteCursorVisible

enableRemoteCursorVisible
enableRemoteCursorVisible(enable: boolean): void
Set whether to enable the display of remote custom cursor

Parameters

NameTypeDescription
enablebooleanWhether to open

Details

Required or not: Yes.

Call timing: After the SDK is initialized.

getInstance

getInstance
getInstance(): ZegoSuperBoardManager
Get ZegoSuperBoardManager instance object
  • When to call /Trigger: After integrating ZegoSuperBoard SDK, before initializing ZegoSuperBoard SDK.

ZegoSuperBoardManager instance object

getSuperBoardSubViewModelList

getSuperBoardSubViewModelList
getSuperBoardSubViewModelList(): List<ZegoSuperBoardSubViewModel>
Get the information of superBoardSubView saved by the SDK

Through superBoardSubViewModelList, access to the current existing superBoardSubView room number and superBoardSubView information.

  • Use cases: After entering the room, you need to obtain the superBoardSubView list in the room for display, and switch the current superBoardSubView in the list.
  • When to call /Trigger: After initializing ZegoSuperboard SDK.

Information of superBoardSubView saved by the SDK

isEnabledCustomCursor

isEnabledCustomCursor
isEnabledCustomCursor(): boolean
Whether to turn on the cursor display

Detailed description: Whether to turn on the cursor display

Calling time: After initializing the SDK.

Whether to turn on the cursor display

isEnabledResponseScale

isEnabledResponseScale
isEnabledResponseScale(): boolean
Get whether it will respond to the zoom factor synchronized by other users

Get whether it will respond to the zoom factor synchronized by other users

  • When to call: this is called when currentSuperBoardSubView exists.

whether it will respond to the zoom factor synchronized by other users

isEnabledSyncScale

isEnabledSyncScale
isEnabledSyncScale(): boolean
Get whether the current zoom factor will be synchronized to others

Get whether the current zoom factor will be synchronized to others

  • When to call: this is called when currentSuperBoardSubView exists.

whether the current zoom factor will be synchronized to others

isEnabledRemoteCursorVisible

isEnabledRemoteCursorVisible
isEnabledRemoteCursorVisible(): boolean
Whether the remote cursor is on

Detailed description: Whether the remote cursor is on

Required or not: Yes.

Calling time: After initializing the SDK.

Whether the remote cursor is on

setContainerView

setContainerView
setContainerView(): Promise<void>
Whiteboard area where files need to be mounted

Details: Transfer the whiteboard area of the file to be mounted to the SDK. Call time: after the SDK is initialized and the room is successfully logged in

setCustomCursorAttribute

setCustomCursorAttribute
Customize the local custom cursor

Parameters

NameTypeDescription
typeZegoSuperBoardToolSet the tool type, currently only supports setting the brush style
attrZegoSuperBoardCursorAttributeCustom cursor related attributes

Details

Detailed description: Set the pointer icon of the local custom cursor and the hot spot of the pointer (that is, the actual click position of the custom icon)

Required or not: Yes.

Calling time: after opening the local custom cursor.

setLogConfig

setLogConfig
setLogConfig(config: ZegoLogConfig): boolean
Log advanced configuration

Parameters

NameTypeDescription
configZegoLogConfigLog configuration options

Details

Configure the client print log level. Logs are an important means of locating problems.

  • Use cases: In most scenarios, customers do not need to call this interface, but use the default configuration.
  • Default value: local log is error.
  • When to call: After initialization, before any other interface.

Usage restrictions: None, but it is recommended to call it only once in the whole life cycle.

Do not call this interface to change the default configuration unless there is a clear special requirement.

  • Available since: 2.1.6 and above

Return

Whether the call is successful; failure: input parameter format is incorrect

uploadFile

uploadFile
uploadFile(filePath: string, renderType: ZegoSuperBoardRenderType): Promise<void>
Upload files to the ZegoSuperBoard service

Parameters

NameTypeDescription
filePathstringThe absolute path of the files to be uploaded can be PPT, PDF, XLS, JPG, JPEG, PNG, BMP, and TXT files. For details, please refer to File specifications.
renderTypeZegoSuperBoardRenderTypeAfter the upload file transcoding rendering mode type, suggest set to VectorAndIMG, see ZegoSuperBoardRenderType.

Details

During the upload process, the SDK will format the file according to the passed [renderType]. After the format conversion, the rendering mode of the file depends on the passed [renderType]. The progress information of the upload can be obtained in the result callback

  • Use cases: Upload files to the ZegoDocs service.
  • Caution: There will be multiple callbacks during the upload phase, please refer to the definition of ZegoSuperBoardUploadFileState for details
  • When to call /Trigger: After ZegSuperBoard SDK is initialized.

Return

Return the request seq to upload the file

cancelUploadFile

cancelUploadFile
cancelUploadFile(seq: number): Promise<ZegoSuperBoardApiCalledCallbackModel>
Cancel the upload action during file upload

Parameters

NameTypeDescription
seqnumberUpload seq returned when uploadFile is called.

Details

To cancel the file upload operation, the seQ of the corresponding upload task must be passed.

  • Use cases: File uploading to the ZegoDocs service is interrupted during the process.

When to call

when the uploadFile interface is in the process of uploading a file.

cacheFile

cacheFile
cacheFile(fileID: string): Promise<ZegoSuperBoardApiCalledCallbackModel>
Cache files to local storage

Parameters

NameTypeDescription
fileIDstringThe fileID to be cached.

Details

You can save the corresponding file to the local.

  • Use cases: Save the file to the local directory. You do not need to request the network to open the file next time, which improves the opening speed.
  • When to call: You need to call it after initWithConfig.

Return

Operation results

cancelCacheFile

cancelCacheFile
cancelCacheFile(seq: ZegoSuperBoardSeq): boolean
Cancel the cache action in the process of caching files

Parameters

NameTypeDescription
seqZegoSuperBoardSeqThe sequence number of caching operation.

Details

You can cancel the operation that is caching the file. You need to pass in the seQ corresponding to the operation of caching the file. After canceling the operation, the file will not be cached locally.

  • Use cases: The cancelCacheFile method can be called to cancel the operation that needs to be interrupted during the execution of the cache file.
  • When to call: You need to call it after initWithConfig.
  • Related APIs: cacheFile.
  • Available since: v2.0.0

Return

Operation results

queryFileCached

queryFileCached
queryFileCached(fileID: string): Promise<ZegoSuperBoardQueryCachedModel>
Check if the file cache exists

Parameters

NameTypeDescription
fileIDstringThe ID of the file to be queried.

Details

The ID of the corresponding file can be used to check whether the file has been cached locally.

  • Use cases: None Example Query whether the file cache exists.
  • When to call: You need to call it after initWithConfig.
  • Related APIs: cancelCacheFile.

uploadH5File

uploadH5File
uploadH5File(filePath: string, config: ZegoSuperboardCustomH5Config): Promise<void>
Upload custom H5 courseware

Parameters

NameTypeDescription
filePathstringLocal path for custom courseware
configZegoSuperboardCustomH5ConfigConfiguration of H5 courseware customization

Details

During the upload process, SDK will convert the format of the file according to the incoming [config]. After the format conversion, the width and height of the page number of the file and whether the thumbnail is included depend on the incoming [config]. The progress information of the upload can be obtained in the result callback.

  • Use cases: Upload custom H5 courseware.
  • When to call: You need to call it after the initialization is successful.

Return

Return the uploaded file information

setCustomFontFromAsset

setCustomFontFromAsset
setCustomFontFromAsset(regularAssetPath: string, boldAssetPath: string): void
Set custom new font

Parameters

NameTypeDescription
regularAssetPathstringFont name of regular font. Please contact technical support to obtain the font.
boldAssetPathstringFont name of the bold font. Please contact technical support to obtain the font.

Details

You need to set a new custom font style for the text tool on the whiteboard.

  • Use cases: Set custom new fonts.
  • When to call: This is called after the whiteboard or file has been created.
  • Caution: Only specific fonts are supported, and the font files provided by us need to be built into the project, please contact technical support to obtain the font file and the corresponding font name.

init

init
Initialize the ZegoSuperBoard SDK

Parameters

NameTypeDescription
configZegoSuperBoardInitConfigConfiguration information required for SDK initialization

Details

Method to initialize the ZegoSuperBoard SDK.

  • Use cases: Initialize the ZegoSuperBoard SDK.
  • When to call: Before calling the ZegoExpressEngine SDK's loginRoom interface
  • Related APIs: unInit.

Return

Initialization result callback

setCustomizedConfig

setCustomizedConfig
setCustomizedConfig(key: ZegoSuperBoardCustomConfigKey, value: string): Promise<void>
Setting initialization parameters is optional<br/>For example:<br/>The key value is logPath, which is the directory where the SDK records logs.<br/>The key value is cachePath, the address of the directory cached by the SDK.

Parameters

NameTypeDescription
keyZegoSuperBoardCustomConfigKeyvalue description
valuestringkey description
  • When to call: Called after initializing the Superboard SDK

Return

Whether the setting is successful

enableSuperBoardView

enableSuperBoardView
enableSuperBoardView(enable: boolean): Promise<void>
Set whether to use SuperBoardView

Parameters

NameTypeDescription
enablebooleantrue: SuperBoardView is used. false: SuperBoardView is not used,The default is true

Details

Set whether to use SuperBoardView.

When to call : Before initializing the SDK.

Open by default

createWhiteboardView

createWhiteboardView
Creating a pure whiteboard

Parameters

NameTypeDescription
configZegoCreateWhiteboardConfigPure Whiteboard configuration parameters
  • When to call: After initializing the ZegoSuperboard SDK, calling [loginRoom] to log in to the room, when you need to create a pure whiteboard.

createFileView

createFileView
Create a file

Parameters

NameTypeDescription
configZegoCreateFileConfigThe configuration parameters required to create the file

Details

After the creation is successful, the corresponding SubView will be saved internally and its subViewModel data will be returned.

When to Call: Initialize the ZegoSuperboard SDK and call [loginRoom] to login to the room when the file needs to be created.

destroySuperBoardSubView

destroySuperBoardSubView
destroySuperBoardSubView(uniqueID: string): Promise<ZegoSuperBoardApiCalledCallbackModel>
Destroys the specified SuperBoardSubView view

Parameters

NameTypeDescription
uniqueIDstringUnique identifier of the ZegoSuperBoardSubView object

Details

When to call

the call querySuperBoardSubViewList pull to list or superBoardSubViewModelList get called when the model number greater than zero.

If you need to delete in batches, please execute serially

querySuperBoardSubViewList

querySuperBoardSubViewList
querySuperBoardSubViewList(): Promise<ZegoSuperBoardQueryListCallbackModel>
Query the server for the list of SuperBoardSubView that currently exists

Pull down the whiteboard in the current room at one time, SDK internal will be associated with the file in the whiteboard file also loaded down, these whiteboard and file SDK internal processing mapping added to the ZegoSuperBoardSubView, external only need to use ZegoSuperBoardView.

When to call

the SDK and call it after logging in to the room.

clearCache

clearCache
clearCache(): Promise<void>
Clear cache resources related to files and whiteboards

Calling time: Initialization, after entering the room, the SDK needs to call it actively before exiting the room to clean up the resources in the room.

clear

clear
clear(): void
Empty resources in the room called upon checkout

When checking out, you need to clear the cache information in the room and stop media playback.

  • When to call: You need to call it before you check out.

unInit

unInit
unInit(): void
Uninitialize the SDK
  • When to call: When you need to reinitialize the SDK, you must first call unInit.
  • Available since: v2.0.0

getSDKVersion

getSDKVersion
getSDKVersion(): string
Obtain the SDK version number

Obtain the SDK version number.

  • Use cases:
  1. When the SDK is running, if the developer finds the discrepancy with the expected situation, the developer can submit the problem and related logs to the ZEGO technical personnel for locating the problem. The ZEGO technical personnel may need the SDK version information to assist locating the problem.
  2. Developers can also collect this information as the VERSION information of the SDK used by the App, so as to make statistics of the SDK corresponding to each version of the App online.
  • When to call: It can be called at any time.
  • Available since: v2.0.0

Version number of the SDK

getCustomizedConfig

getCustomizedConfig
getCustomizedConfig(key: ZegoSuperBoardCustomConfigKey): Promise<string>
Get the value of the set configuration item

Parameters

NameTypeDescription
keyZegoSuperBoardCustomConfigKey

Details

Get the value of the set configuration item.

  • When to call: After initializing the Superboard SDK, after calling setCustomizedConfig.

on

on
on(event: K, callBack: ZegoEvent[K]): void
Register to listen for events

Parameters

NameTypeDescription
eventKMonitor event name
callBackZegoEvent[K]Callback
  • Use cases: Relevant information can be obtained by registering a specified method, for example, by registering for a whiteboard switching notification event, you can listen to the UniqueID of the opposite end to switch the whiteboard in real time.
  • When to call: After ZegSuperBoard SDK is initialized.

Return

Whether the registration is successful

off

off
off<K extends keyof ZegoEvent>(event: K, listener?: ZegoEvent[K]): void
Delete listening event

Parameters

NameTypeDescription
eventKNeed to unlisten event name
listener?ZegoEvent[K]Callback

Details

The specified monitoring event can be deleted

  • When to call: After initializing the ZegoSuperboard SDK and registering the listener event.

Return

Whether the cancellation was successful

getSuperBoardView

getSuperBoardView
getSuperBoardView(): ZegoSuperBoardView
Get SuperBoardView object

Open the SuperBoardView mode to get the object.

  • Use cases: SuperBoardView mode is turned on, use the method on the object to switch the whiteboard on the A side, and the B side will automatically synchronize.
  • Default value: Get the object by default
  • When to call: After initializing ZegoSuperboard SDK.
  • Caution: If you use the enableSuperBoardView interface and set it to false, you cannot get the SuperBoardView object.
  • Available since: 2.0.0

BoardView object

enableSyncScale

enableSyncScale
enableSyncScale(enable: boolean): void
Set whether to synchronize the zoom to other members in the room

Parameters

NameTypeDescription
enableboolean

Details

After enabling, you can send out the zoom of the local end. Whether the peer end wants to accept it, you need to enable the peer end to accept the zoom.

  • Use cases: Synchronize the zooming of the whiteboard on the operating end and the receiving end.
  • Default value: When this interface is not called to set the scene, the default configuration is false.
  • When to call: After ZegSuperboard SDK is initialized.
  • Caution: To achieve dual-ended zoom synchronization, you need to set enableSyncScale and enableResponseScale at the same time
  • Related callbacks: scaling changes occur on the peer end, and the receiving end can monitor the changed parameters through remoteSuperBoardScaleChanged.
  • Available since: 2.0.0

enableResponseScale

enableResponseScale
enableResponseScale(): Promise<boolean>
Whether to respond to the zoom of other members in the room

After it is turned on, it can respond to the zooming of other members in the room, provided that the peer end synchronizes the zooming to other members in the room.

  • Use cases: Synchronize the zooming of the whiteboard on the operating end and the receiving end.
  • Default value: When this interface is not called to set the scene, the default configuration is false.
  • When to call: After ZegSuperboard SDK is initialized.
  • Caution: To achieve dual-ended zoom synchronization, you need to set enableSyncScale and enableResponseScale at the same time
  • Related callbacks: scaling changes occur on the peer end, and the receiving end can monitor the changed parameters through remoteSuperBoardScaleChanged.
  • Available since: 2.0.0

enableHandwriting

enableHandwriting
enableHandwriting(enable: boolean): Promise<boolean>
Set whether to open the pen sharp

Parameters

NameTypeDescription
enablebooleanWhether to enable handwirting effect

Details

Set whether the whiteboard graffiti has a pen sharp effect. If set to true, the graffiti will have a pen sharp effect.

  • Use cases: Adjust the thickness and shape of the strokes according to the speed of the graffiti drawing process to enhance the writing experience.
  • Default value: false.
  • When to call /Trigger: Initialize the SDK, after rendering the whiteboard.
  • Available since: 2.0.0

isEnabledHandwriting

isEnabledHandwriting
isEnabledHandwriting(): Promise<boolean>
Get whether to turn on the stroke effect

When the currently used tool type is brush, call isHandwritingEnabled to get whether to enable the stroke effect.

  • When to call: After ZegSuperBoard SDK is initialized.
  • Available since: 2.0.0

Whether to turn on the stroke effect

setToolType

setToolType
setToolType(tool: ZegoSuperBoardTool): Promise<void>
Set the whiteboard tool type

Parameters

NameTypeDescription
toolZegoSuperBoardToolThe board tool type.

Details

Set the tool type to make the mouse have different functions and effects.

  • Default value: The default value is 1, and the default tool is pen
  • When to call: After ZegSuperBoard SDK is initialized.
  • Available since: 2.0.0

getToolType

getToolType
getToolType(): Promise<ZegoSuperBoardTool>
Get the type of whiteboard tool being used.

Get the type of whiteboard tool being used

  • When to call: After initializing ZegoSuperBoard SDK.
  • Available since: 2.0.0

If there is, return the type of tool in use, otherwise return null

setFontBold

setFontBold
setFontBold(bold: boolean): Promise<void>
Set text bold

Parameters

NameTypeDescription
boldbooleanWhether to set the text bold

Details

After selecting the type of text tool, calling setFontBold and setting it to true, the newly added text on the whiteboard is all bold.

  • Default value: false
  • When to call: After ZegSuperBoard SDK is initialized.
  • Caution: Only the newly-added text after setting the text bold will have the bold effect. For example, the existing text on the whiteboard will not be changed to the bold effect.
  • Available since: 2.0.0

Return

Set result

isFontBold

isFontBold
isFontBold(): Promise<boolean>
Get whether the text is bold

When the currently used tool type is text, call isFontBold to get whether to set the bold effect.

  • When to call: After ZegSuperBoard SDK is initialized.
  • Available since: 2.0.0

Whether it is a bold effect

setFontItalic

setFontItalic
setFontItalic(italic: boolean): Promise<void>
Set whether the text of the text tool is italicized.

Parameters

NameTypeDescription
italicboolean

Details

Set whether the text of the text tool is italicized.

  • Default value: false
  • When to call: After ZegSuperBoard SDK is initialized.
  • Caution: Only the new text after calling will take effect. For example, the existing text on the whiteboard will not be changed.
  • Available since: v2.0.0.

Return

Set result

isFontItalic

isFontItalic
isFontItalic(): Promise<boolean>
Get whether the text is italic effect

When the currently used tool type is text, call isFontItalic to get whether to set the italic effect

  • When to call: After ZegSuperBoard SDK is initialized.
  • Available since: 2.0.0

Returns whether to set italics

setFontSize

setFontSize
setFontSize(fontSize: number): Promise<void>
Set text size

Parameters

NameTypeDescription
fontSizenumberfont size

Details

Select the type of text tool, call setFontSize to set, the new text on the whiteboard is the size after setting.

  • Default value: 24, the maximum value shall not exceed 100
  • When to call: After ZegSuperBoard SDK is initialized.
  • Caution: Only the new text after calling setFontSize will take effect. For example, the existing text on the whiteboard will not be changed to the font size.
  • Available since: 2.0.0

Return

Set result

getFontSize

getFontSize
getFontSize(): Promise<number
Get text size

When the currently used tool type is text, call getFontSize to get the font size of the current text tool.

  • When to call: After ZegSuperBoard SDK is initialized.
  • Available since: v2.0.0

Font size

setBrushSize

setBrushSize
setBrushSize(size: number): Promise<void>
Set the brush thickness

Parameters

NameTypeDescription
sizenumberBrush thickness

Details

Select the brush tool type, call setBrushSize to set the value, and the new graffiti thickness on the whiteboard is the set value.

  • Default value: 6
  • When to call: After ZegSuperBoard SDK is initialized.
  • Caution: The newly added graffiti after only setting the brush thickness has a new thickness effect. For example, the graffiti on the whiteboard will not be changed to the thickness.
  • Available since: 2.0.0

Return

Set result

getBrushSize

getBrushSize
getBrushSize(): Promise<number>
Get brush thickness

When the currently used tool type is text, call getBrushSize to get the brush thickness.

  • When to call: After ZegSuperBoard SDK is initialized.
  • Available since: 2.0.0

Brush thickness

setBrushColor

setBrushColor
setBrushColor(color: string): Promise<void>
Set pen color

Parameters

NameTypeDescription
colorstringcolor

Details

After selecting the brush tool type and calling setBrushColor, the new graffiti color on the whiteboard will take effect.

  • Default value: #f54326
  • When to call: After ZegSuperBoard SDK is initialized.
  • Caution: Only the new graffiti after setting the pen color will take effect. If the graffiti already exists on the whiteboard before, it will not be changed to the color.
  • Available since: v2.0.0

Return

Set result

getBrushColor

getBrushColor
getBrushColor(): Promise<string>
Get the brush color

When the currently used tool type is brush, call getBrushColor to get the current brush color.

  • When to call: After ZegSuperBoard SDK is initialized.
  • Available since: 2.0.0

Pen color, hexadecimal RGBA

ZegoSuperBoardQueryListCallbackModel

Details

Detailed description: data model class, which contains the name of the created ZegoSuperboardSubView, the creation time, the file ID contained, the file type and the unique identifier of the ZegoSuperboardSubView object.

Business scenario: The main user obtains the name and file information of the corresponding ZegoSuperboardSubView object.

Properties

errorCode

errorCode

subViewModelList

subViewModelList
subViewModelList: ZegoSuperBoardSubViewModel[]

extraInfo

extraInfo
extraInfo: string

ZegoSuperBoardSubView

Methods

clearSelected

clearSelected
clearSelected(): void
Delete the selected element

batch delete selected multiple primitives

  • When to call: when there are primitives on the whiteboard, it can be used.
  • Available since: 2.0.0 and above

getCurrentStep

getCurrentStep
getCurrentStep(): number
Animation steps to get the current page number of the dynamic PPT, starting from 1
  • Available since: 2.0.0 and above.

When to call : after initializing ZegoSuperBoard SDK.

  • Restrictions: Only dynamic PPT can be called

Animation steps for the current page number

reloadView

reloadView
reloadView(options?: ReloadOptions): void
Reload SubView

Parameters

NameTypeDescription
optionsReloadOptionsReload configuration items

Details

This method can be used to reload the SubView when the size of the mounted parent container is dynamically modified

When to call

ZegSuperBoard SDK is initialized.

  • Caution:
  1. Each time this interface is called, the entire SubView content will be redrawn, and the position will be adaptive in real time. In order to improve the interactive experience, it can be called with limited frequency.
  2. It is only supported to call this API to reload View when the browser zoom is 100%. Otherwise, the file may be displayed abnormally due to the conflict between the adaptive strategy of this API and the adaptive strategy caused by the second zoom of the browsing.
  • Available since: 2.0.0 and above.

getExcelSheetNameList

getExcelSheetNameList
getExcelSheetNameList(): Promise<string[]>
Get the list of Excel sheet names

Get the names of all sheet tables in this excel file.

  • Use cases: When you need to display the sheet table of the excel file, use this method to get the names of all the sheet tables of the excel file.
  • Caution: Return an empty list for non-excel file types.
  • When to call: After createFile succeeds or the pull list succeeds.

List of Sheet names of Excel files

getThumbnailUrlList

getThumbnailUrlList
getThumbnailUrlList(): Promise<string[]>
Get the current file thumbnail list, only supports PDF, PPT, dynamic PPT, H5 file format

If you need to display the preview screen of the file, you can get the corresponding preview image through this interface, and then click the preview image to turn the page

  • Use cases: Display the preview screen of each page of the document
  • When to call /Trigger: Called after the file is loaded, otherwise it returns an empty list.
  • Restrictions: Only support PDF, PPT, dynamic PPT, H5 file format, other types return an empty list.

List of URL addresses of thumbnails of each page of the file

getPPTNotes

getPPTNotes
getPPTNotes(page: number): Promise<string>
Get the notes of the specified page number of the PPT

Parameters

NameTypeDescription
pagenumberThe specified page number, starting from 1

Details

Get the notes of the specified page number of the PPT.

  • Use cases: Get the notes of the specified page number of the PPT.
  • When to call: After the loadFile succeeds.
  • Restrictions: Only support PPT, dynamic PPT file format, other types returns null.

Return

Notes on this page, if there are no notes, null will be returned

getCurrentSuperBoardSubViewModel

getCurrentSuperBoardSubViewModel
getCurrentSuperBoardSubViewModel(): ZegoSuperBoardSubViewModel
Get the model data corresponding to the whiteboard

Get the ZegoSuperBoardSubViewModel data corresponding to the whiteboard

  • Use cases: Get the ZegoSuperBoardSubViewModel data corresponding to the whiteboard, such as the whiteboard ID, name, associated file ID, current zoom factor, etc.

When to call

ZegSuperBoard SDK is initialized.

the ZegoSuperBoardSubViewModel data corresponding to the whiteboard

inputText

inputText
Add text to the whiteboard View, and an input box will pop up from the bottom of the whiteboard after calling.

Add text to the whiteboard View, and an input box will pop up from the bottom of the whiteboard after calling.

  • Use cases: Add text to the whiteboard View, and an input box will pop up from the bottom of the whiteboard after calling.
  • Default value: The default content of the input box is "text", you can set the default text through [ZegoSuperBoardManager.setCustomText], the default display position is the middle of the current whiteboard range
  • When to call: this is called when currentSuperBoardSubView exists.

undo

undo
undo(): Promise<void>
Undo the last operation of the whiteboard

Undo the last operation of the whiteboard.

  • Use cases: Whiteboard related operations.
  • Related APIs: redo.
  • When to call: when currentSuperBoardSubView exists.

redo

redo
redo(): Promise<void>
Restore the undone operation on the whiteboard

Restore the undone operation on the whiteboard.

  • Use cases: Whiteboard related operations.
  • Related APIs: undo.
  • When to call: this is called when currentSuperBoardSubView exists.

clearCurrentPage

clearCurrentPage
clearCurrentPage(): Promise<ZegoSuperBoardApiCalledCallbackModel>
Clear the primitives on the current page of the whiteboard

Clear the primitives on the current page of the whiteboard.

  • Use cases: Whiteboard related operations.
  • Related APIs: clearAllPage.
  • When to call: this is called when currentSuperBoardSubView exists.

Operation result callback. If deleting the primitives of the current page is successful, it will return success, otherwise it will fail

clearAllPage

clearAllPage
clearAllPage(): void
Clear the primitives on all page of the whiteboard

Clear the primitives on all page of the whiteboard.

  • Use cases: Whiteboard related operations.
  • Related APIs: clearCurrentPage.
  • When to call: this is called when currentSuperBoardSubView exists.
  • Available since: v2.0.0

setOperationMode

setOperationMode
setOperationMode(mode: ZegoSuperBoardOperationMode): Promise<void>
Set the operating mode of the current whiteboard

Parameters

NameTypeDescription
modeZegoSuperBoardOperationModeoperation mode

Details

Set the operation mode of the current whiteboard, such as prohibiting the client's gesture operation on the whiteboard.Users can use bitwise or to set multiple modes at the same time. For example, when set to Zoom | Draw, it can support both zoom mode and drawing mode.

  • Use cases: Normally, there is no need to call this method. When the toolType is set, the SDK will call this method to process the whiteboard. If you need to prohibit the client's gesture operation on the whiteboard, you can use this method to set it to None mode.
  • Default value: Draw/zoom mode.
  • Impacts on other APIs: When set to scroll mode, gestures will be recognized as scrolling, and when set to drawing mode, gestures will be recognized as drawing-related operations at this time.
  • Caution: It can be called only when the currentSuperBoardSubView exists. You can use the getCurrentSuperBoardSubView() method to determine whether the currentSuperBoardSubView exists, otherwise it will not have any effect.
  • When to call: this is called when currentSuperBoardSubView exists.
  • Available since: v2.0.0

flipToPage

flipToPage
flipToPage(targetPage: number): Promise<ZegoSuperBoardApiCalledCallbackModel>
Jump to the specified page

Parameters

NameTypeDescription
targetPagenumberThe page number of the target page, starting from 1

Details

Jump to the specified page .

  • Use cases: Specify a page number to jump.
  • Caution: If it is a dynamic ppt or H5 file, the jump page may need to download pictures and animation resources, so frequent calls may cause it to take a long time to complete.
  • Related callbacks: scrollChange.
  • Related APIs: flipToPrePage,flipToNextPage
  • When to call: this is called when currentSuperBoardSubView exists.

flipToPrePage

flipToPrePage
flipToPrePage(): Promise<ZegoSuperBoardApiCalledCallbackModel>
Jump to the previous page

Jump to the previous page.

  • Caution: If it is a dynamic ppt or H5 file, the jump page may need to download pictures and animation resources, so frequent calls may cause it to take a long time to complete.
  • Related callbacks: scrollChange.
  • Related APIs: flipToPage,flipToNextPage
  • When to call: this is called when currentSuperBoardSubView exists.
  • Available since: v2.0.0

flipToNextPage

flipToNextPage
flipToNextPage(): Promise<ZegoSuperBoardApiCalledCallbackModel>
Jump to the next page

Jump to the next page.

  • Caution: If it is a dynamic ppt or H5 file, the jump page may need to download pictures and animation resources, so frequent calls may cause it to take a long time to complete.
  • Related callbacks: scrollChange.
  • Related APIs: flipToPage,flipToPrePage
  • When to call: this is called when currentSuperBoardSubView exists.
  • Available since: v2.0.0

preStep

preStep
Jump to the previous step animation

Jump to the previous step animation

  • Caution: Only for dynamic ppt or H5 files, otherwise it will not have any effect.
  • Related APIs: nextStep.
  • When to call: this is called when currentSuperBoardSubView exists.
  • Available since: v2.0.0.

nextStep

nextStep
Jump to the next step animation

Jump to the next step animation

  • Caution: Only for dynamic ppt or H5 files, otherwise it will not have any effect.
  • Related APIs: preStep.
  • When to call: this is called when currentSuperBoardSubView exists.
  • Available since: v2.0.0.

getPageCount

getPageCount
getPageCount(): Promise<number>
Get the total number of pages

Get the page number of the currently displayed content

  • When to call: When using ZegoSuperBoardView, this is called when currentSuperBoardSubView exists. When not in use ZegoSuperBoardView, when superBoardSubViewModel superBoardSubViewModelList existence can be invoked.
  • Available since: v2.0.0.

total number of pages

switchSuperBoardSubViewWithSheetIndex

switchSuperBoardSubViewWithSheetIndex
switchSuperBoardSubViewWithSheetIndex(uniqueID: string, sheetIndex: number): Promise<ZegoSuperBoardApiCalledCallbackModel>
Switch the excel file to the specified sheet page

Parameters

NameTypeDescription
uniqueIDstringUnique IDENTIFIER of the SuperBoardSubView
sheetIndexnumberThe index of the target sheet of the excel file

Details

Switch the excel file to the specified sheet page.

  • Use cases: When opening an excel file, the default is the 0th sheet page.
  • When to call: this is called when currentSuperBoardSubView exists.
  • Available since: v2.3.6

getVisibleSize

getVisibleSize
getVisibleSize(): ZegoSuperboardSize
Get the size of the visible area of the file

Get the size of the visible area of the file. For example, use a size of 1000x1000 to load a 64x64 picture. At this time, the size of the visible area is 64x64.

  • Caution: If it is not a file whiteboard, 0 will be returned.
  • When to call: this is called when currentSuperBoardSubView exists.
  • Available since: v2.0.0.

The size of the visible area

getCurrentSheetName

getCurrentSheetName
getCurrentSheetName(): Promise<string>
Get the name of the currently displayed sheet

Get the name of the currently displayed sheet, if it is not excel, return null.

  • When to call: this is called when currentSuperBoardSubView exists.
  • Available since: v2.0.0.

name of the currently displayed sheet

addImage

addImage
addImage(type : ZegoSuperBoardViewImageType, address: string, positionX: number, positionY: number): Promise<ZegoSuperBoardApiCalledCallbackModel>
Insert picture to whiteboard

Parameters

NameTypeDescription
typeZegoSuperBoardViewImageTypePicture type, currently supports normal pictures and custom graphics
addressstringPicture address, supports local picture address and network picture address, local picture will be uploaded to CDN storage first. Currently, custom graphics only support network picture addresses. (Only https is supported for network pictures) Example: "xxxxxxxxxx.png", "".
positionXnumberThe starting point of the image insertion position, relative to the horizontal offset of the upper left corner of the viewport, such as 10, where the viewport refers to the writable area. Just pass 0 to the custom graphics directly.
positionYnumberThe starting point of the image insertion position, relative to the vertical offset of the upper left corner of the viewport, such as 10, where the viewport refers to the writable area. Just pass 0 to the custom graphics directly.

Details

Insert pictures into the whiteboard, directly insert into the whiteboard display or set custom graphics.

  • Use cases: After setting the custom graphics, when the whiteboard tool is selected as the custom graphics, touching the whiteboard will draw the custom graphics passed in here.
  • Caution: Supported image types: png/jpg/jpeg, when the type is ZegoWhiteboardViewImageGraphic, it supports local images and network images, and the image size limit is 10M. When the type is ZegoWhiteboardViewImageCustom, only network images are supported, and the image size limit is 500KB.
  • Related callbacks: IZegoSuperBoardApiCalledCallback.
  • When to call: this is called when currentSuperBoardSubView exists.
  • Available since: v2.0.0 .

clearSelected

clearSelected
clearSelected(): Promise<ZegoSuperBoardApiCalledCallbackModel>
Delete the selected element

Select some primitives through the selection tool of the whiteboard, and call this method to delete the selected primitives.

  • When to call: After getting the SuperBoardSubView list.

setBackgroundImage

setBackgroundImage
setBackgroundImage(address: string, mode: ZegoSuperBoardViewImageFitMode): Promise<ZegoSuperBoardApiCalledCallbackModel>
Set the background image to the whiteboard

Parameters

NameTypeDescription
addressstringThe background image path, local path or network path can be used (network image only supports https). Example: "xxxxxxxxxx.png", "".
modeZegoSuperBoardViewImageFitModeBackground image fill mode

Details

Set a background image to the whiteboard, support local path or network path, this background image will be synchronized to other users in the room.

  • When to call: After Get the SuperBoardSubView list.

clearBackgroundImage

clearBackgroundImage
clearBackgroundImage(): Promise<ZegoSuperBoardApiCalledCallbackModel>
Clear the background image of the whiteboard

Clear the background image of the whiteboard, this action will be synchronized to other users in the room.

  • When to call: Get the SuperBoardSubView list.

stopPlayPPTVideo

stopPlayPPTVideo
stopPlayPPTVideo(): Promise<void>
Stop the video being played on the current dynamic ppt page

Stop the video currently being played on the dynamic ppt page, generally used to stop the audio and video playback of the dynamic PPT file when switching files.

  • When to call: Called during audio and video playback after the file has been successfully loaded.

setWhiteboardBackgroundColor

setWhiteboardBackgroundColor
setWhiteboardBackgroundColor(color: string): Promise<void>
Set the background color of the whiteboard

Parameters

NameTypeDescription
colorstringBackground color

Details

Set the background color of the whiteboard, such as setting the pure whiteboard to dust, etc.

  • Default value: rgb(241, 243, 244)
  • When to call: After ZegSuperBoard SDK is initialized.
  • Caution: 1. Since the whiteboard is overlaid on the file, setting the background color of the whiteboard will obscure the file. 2. After setting the whiteboard background color, all whiteboard background colors in the room will take effect
  • Available since: 2.0.0

Return

Set result

ZegoSuperBoardSubViewModel

Details

Data model class that contains the name of the ZegoSuperBoardSubView that was created, the time it was created, the ID of the contained file, the type of the file, and the unique identifier of the ZegoSuperBoardSubView object.

  • Use cases: :The user obtains the ID, name and file information of the corresponding ZegoSuperBoardSubView object.

Properties

name

name
name: string

Name of SuperBoardSubView

createTime

createTime
createTime: number

Whiteboard Creation Time Unix timestamp (milliseconds)

fileID

fileID
fileID: string

File ID, which is unique

fileType

fileType

File type, refer to ZegoSuperBoardFileType

uniqueID

uniqueID
uniqueID: string

SuperBoardSubview ID, This ID is unique.

whiteboardIDList

whiteboardIDList
whiteboardIDList: string[]

A list of whiteboard IDs

ZegoSuperBoardView

Methods

getCurrentSuperBoardSubView

getCurrentSuperBoardSubView
getCurrentSuperBoardSubView(): ZegoSuperBoardSubView | null
Get the current display superBoardSubView

If you need to perform page turning operations on the currently displayed superBoardSubView, etc., after obtaining the currently displayed superBoardSubView, call the page turning method on the superBoardSubView.

  • When to call: After ZegSuperBoard SDK is initialized.
  • Caution: Effective when the superBoardView mode is turned on.

Current display superBoardSubView

switchSuperBoardSubView

switchSuperBoardSubView
switchSuperBoardSubView(uniqueID: string, sheetIndex?: number): Promise<ZegoSuperBoardApiCalledCallbackModel>
Switch to the specified SuperBoardSubView

Parameters

NameTypeDescription
uniqueIDstringUnique IDENTIFIER of the SuperBoardSubView
sheetIndex?numberIf the switch BoardSubView is an Excel file, you need to switch the specified sheet and input sheetIndex

Details

Detailed description: switch to the specified SubView, multi-terminal synchronization.

Related callback: remoteSuperBoardSubViewSwitched.

ZegoSuperBoardViewCreatedCallbackModel

Create the completion callback of SubView

Details

Supported version: v0.1.0.

Detailed description: After calling the createWhiteboardView and createFileView interfaces, the result of the creation will come out through this callback.

Business scenario: creating whiteboards and files.

Callback timing: Call the createWhiteboardView and createFileView interfaces.

Related interfaces: [createWhiteboardView], [createFileView]

Properties

errorCode

errorCode
errorCode: number

Error code, 0 means success

name

name
name: string

Name of SuperBoardSubView

createTime

createTime
createTime: number

Whiteboard Creation Time Unix timestamp (milliseconds)

fileID

fileID
fileID: string

File ID, which is unique

fileType

fileType
fileType: number

File type, refer to ZegoSuperBoardFileType

uniqueID

uniqueID
uniqueID: string

SuperBoardSubview ID, This ID is unique.

whiteboardIDList

whiteboardIDList
whiteboardIDList: string[]

A list of whiteboard IDs

ZegoSuperboardCustomH5Config

Details

Custom H5 courseware property construction class can set the width, height, page number and thumbnail information of custom courseware.

  • Use cases: It needs to be passed in the interface of uploading custom H5 courseware.

Properties

width

width
width: number

Customize the width of H5 courseware

Required or not: Mandatory

  • Value range: Greater than 0

height

height
height: number

Customize the height of H5 courseware.

Required or not: Mandatory

  • Value range: Greater than 0

pageCount

pageCount
pageCount: number

Customize the number of pages of H5 courseware.

thumbnailList

thumbnailList
thumbnailList: string[]

Customize H5 courseware thumbnail relative path array.

  • Required: optional parameters
  • Available since: 0.1.0

Previous

Function Overview

Next

Interface