The content of this page has been automatically translated by AI. If you encounter any problems while reading, you can view the corresponding content in Chinese.

Mini Program Platform API Overview

Last updated: 2024-12-20 17:51:40

TEduBoardController

Primary Interface Class for Whiteboard Features
Class
Description
TEduBoard
Whiteboard Controller

Creating and Terminating an Instance

API
Description
TEduBoard
Whiteboard Constructor
destroy
Terminate Whiteboard

Setting the TEduBoardCallback Callback

API
Description
on
Enable Event Listening
off
Cancel event listener

Basic Process Interface

API
Description
addSyncData
Adding Whiteboard Synchronization Data
getVersion
Getting the SDK Version Number
setDataSyncEnable
Configuring Whether Data Synchronization is Enabled for the Whiteboard
isDataSyncEnable
Retrieving Whether Data Synchronization is Enabled for the Whiteboard
reset
Resetting the Whiteboard
getSyncTime
Retrieving the Synchronization Timestamp
syncRemoteTime
Synchronizing the Remote Timestamp

Doodling Related Interfaces

API
Description
setDrawEnable
Set Whether Doodling is Allowed on Whiteboard
isDrawEnable
Get Whether Doodling is Allowed on Whiteboard
setAccessibleUsers
Set Which Users' Graphics are Allowed for Operations
setGlobalBackgroundColor
Set Background Color for All Whiteboards
getGlobalBackgroundColor
Get Global Background Color of Whiteboard
setBackgroundColor
Set Background Color of Current Whiteboard Page
getBackgroundColor
Get Background Color of Current Whiteboard Page
setToolType
Set Whiteboard Tools to Use
getToolType
Get Whiteboard Tools in Use
setCursorIcon
Custom Whiteboard Tool Mouse Style
setBrushColor
Set Brush Color
getBrushColor
Get Brush Color
setBrushThin
Set Brush Thickness
getBrushThin
Get Brush Thickness
setTextColor
Set Text Color
getTextColor
Get text color
setTextSize
Set text size
getTextSize
Get text size
setTextStyle
Set text style
getTextStyle
Get text style
setLineStyle
Set line style
getLineStyle
Get line style
setOvalDrawMode
Set ellipse drawing mode
getOvalDrawMode
Get ellipse drawing mode
clear
Clearing Doodles on Current Whiteboard Page
setBackgroundImage
Set Background Image of Current Whiteboard Page
setBackgroundH5
Set Background H5 Page of Current Whiteboard Page
undo
Undo the Last Action on the Current Whiteboard Page
redo
Redo the last undo on the current whiteboard page
resize
Recalculate Whiteboard Size and Render

Whiteboard Page Operation Interface

API
Description
addBoard
Add a whiteboard page
deleteBoard
Delete a whiteboard page
prevStep
Back: Each step corresponds to an animation effect in the PPT. If there is no displayed animation effect, this interface call will result in a page turning backward.
nextStep
Next
prevBoard
Turn to the previous page
nextBoard
Turn to the next page
gotoBoard
Go to the specified whiteboard page
getCurrentBoard
Get the current whiteboard page ID
getBoardList
Get the whiteboard list of all files
setBoardRatio
Set the aspect ratio of the current whiteboard page
getBoardRatio
Get the aspect ratio of the current whiteboard page
setBoardScale
Set the zoom ratio of the current whiteboard page
getBoardScale
Get the zoom ratio of the current whiteboard page
setBoardContentFitMode
Set the adaptive mode of the whiteboard content
getBoardContentFitMode
Get the adaptive mode of the whiteboard content

File Operation Interface

API
Description
applyFileTranscode
Initiate File Transcoding Request
getFileTranscodeProgress
Proactively check file transcoding progress
addTranscodeFile
Adding a File for Transcoding
deleteFile
Deleting Files
switchFile
Switching Files
getCurrentFile
Getting Current File ID
getFileInfo
Getting File Information for a Specified File in the Whiteboard
getFileInfoList
Getting a List of File Information for All Uploaded Files in the Whiteboard
getFileBoardList
Getting a List of Whiteboard IDs for a Specified File
getThumbnailImages
Getting Thumbnails for a Specified File, Default Files (fileId=#DEFAULT) Not Supported
clearFileDraws
Clearing All Doodles on Specified File

TEduBoardCallback

Callback Interface Class for Whiteboard Features
Class
Description
TEduBoardCallback
Whiteboard event callback API

Common Event Callbacks

API
Description
TEB_ERROR
Whiteboard error callback
TEB_WARNING
Whiteboard Warning Callback

Basic Process Callback

API
Description
TEB_INIT
Callback for the completion of whiteboard initialization
TEB_HISTROYDATA_SYNCCOMPLETED
Callback for the completion of the whiteboard historical data synchronization
TEB_SYNCDATA
Whiteboard synchronization data callback
TEB_OPERATE_CANUNDO_STATUS_CHANGED
Callback for the whiteboard undo status change
TEB_OPERATE_CANREDO_STATUS_CHANGED
Callback for the whiteboard redo status change

Doodle Feature Callbacks

API
Description
TEB_IMAGE_STATUS_CHANGED
Callback for the whiteboard image status change
TEB_SETBACKGROUNDIMAGE
Callback for setting the whiteboard background image
TEB_H5BACKGROUND_STATUS_CHANGED
Callback for the whiteboard background H5 status change

Whiteboard Page Operation Callbacks

API
Description
TEB_ADDBOARD
Callback for adding a whiteboard page
TEB_DELETEBOARD
Callback for deleting a whiteboard page
TEB_GOTOBOARD
Callback for redirecting to a whiteboard page
TEB_GOTOSTEP
Callback for the whiteboard page animation steps

File Operation Callbacks

API
Description
TEB_TRANSCODEPROGRESS
File transcoding progress callback
TEB_ADDTRANSCODEFILE
Callback for adding a file for transcoding
TEB_DELETEFILE
Callback for deleting a file
TEB_SWITCHFILE
Callback for switching to another file
TEB_FILEUPLOADPROGRESS
File upload progress callback
TEB_FILEUPLOADSTATUS
File upload status callback

Key Type Definition

Class
Description
TEduBoardInitParam
Whiteboard Initialization Parameters
TEduBoardLineStyle
Line Style
TEduBoardCursorIcon
Mouse style
TEduBoardTranscodeConfig
File transcoding parameters
TEduBoardTranscodeFileResult
File transcoding result
TEduBoardInfo
Whiteboard information
TEduBoardFileInfo
File information

Enumeration Value

Enumeration
Description
TEduBoardToolType
Whiteboard tools
TEduBoardImageFitMode
Whiteboard Image Fill Alignment Mode
TEduBoardImageStatus
Whiteboard Image Status
TEduBoardTextStyle
Whiteboard Text Style
TEduBoardUploadStatus
Whiteboard Upload Status
TEduBoardBackgroundH5Status
H5 Background Status
TEduBoardContentFitMode
Whiteboard Content Adaptive Mode
TEduBoardLineType
Line type
TEduBoardArrowType
Arrow Type
TEduBoardOvalDrawMode
Ellipse Drawing Mode

Error Codes

Enumeration Value

Enumeration
Description
TEduBoardErrorCode
Whiteboard error codes (critical)
TEduBoardWarningCode
Whiteboard error codes (warning)