Interface
ReloadOptions
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.
Size
The width and height of the visible area
Properties
width
width: number The width of the visible area
height
height: number The height of the visible area
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: 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: 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: number Width of each whiteboard page.
Required or not: Mandatory
- Value range: Positive integer greater than 0.
- Available since: 2.0.0及以上
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: number Total number of pages。
Required or not: Mandatory
- Value range: Greater than 0.
- Available since: v2.0.0
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](#remote-super-board-sub-view-added-callback) 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](#remote-super-board-sub-view-removed-callback) 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](#remote-super-board-sub-view-switched-callback) 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](#remote-super-board-auth-changed-callback) 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](#remote-super-board-graphic-auth-changed-callback) 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](#super-board-sub-view-scale-changed-callback) 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](#super-board-sub-view-scroll-changed-callback) 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](#cache-file-callback) 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.
superBoardSubViewMediaPermission
superBoardSubViewMediaPermission: [superBoardSubViewMediaPermissionCallback](#super-board-sub-view-media-permission-callback) 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.
superBoardSubViewKeydown
superBoardSubViewKeydown: [superBoardSubViewKeydownCallback](#super-board-sub-view-keydown-callback) When switching to a click tool and clicking PPT in dynamic PPT, the keyboard event pressed at this time is triggered by this callback, and the left and right key callbacks are not supported.
Methods
errorCallback
errorCallback(error: ZegoSuperBoardErrorData): [](/javascript_web/class/)| Name | Type | Description |
|---|---|---|
| error | ZegoSuperBoardErrorData | Error message |
remoteSuperBoardAuthChangedCallback
remoteSuperBoardAuthChangedCallback(data: Record<string, number>): [](/javascript_web/class/)| 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>): [](/javascript_web/class/)| 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(uniqueID: string): [](/javascript_web/class/)| Name | Type | Description |
|---|---|---|
| uniqueID | string | return the uniqueID of the subView |
remoteSuperBoardSubViewRemovedCallback
remoteSuperBoardSubViewRemovedCallback(uniqueID: string): [](/javascript_web/class/)| Name | Type | Description |
|---|---|---|
| uniqueID | string | Return the uniqueID of the deleted subView |
remoteSuperBoardSubViewSwitchedCallback
remoteSuperBoardSubViewSwitchedCallback(uniqueID: string): [](/javascript_web/class/)| Name | Type | Description |
|---|---|---|
| uniqueID | string | Return the uniqueID of the switch subView |
superBoardSubViewKeydownCallback
superBoardSubViewKeydownCallback(data: ZegoSuperBoardKeydownModel): [](/javascript_web/class/)| Name | Type | Description |
|---|---|---|
| data | ZegoSuperBoardKeydownModel | Return to information about keyboard keys |
superBoardSubViewMediaPermissionCallback
superBoardSubViewMediaPermissionCallback(data: ZegoSuperBoardMediaModel): [](/javascript_web/class/)| Name | Type | Description |
|---|---|---|
| data | ZegoSuperBoardMediaModel | Returned audio and video related information |
superBoardSubViewScaleChangedCallback
superBoardSubViewScaleChangedCallback(uniqueID: string, scale: number): [](/javascript_web/class/)| Name | Type | Description |
|---|---|---|
| uniqueID | string | return the uniqueID of the subView |
| scale | number | return the scale of the subView |
superBoardSubViewScrollChangedCallback
superBoardSubViewScrollChangedCallback(uniqueID: string, page: number, step: number): [](/javascript_web/class/)| 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 |
ZegoLoadOption
File loading configuration options.
Details
Get the loading status of PPT files.
Properties
PPTReady
PPTReady: boolean Get the PPT file loading status. Please first set this parameter to false (by default). When the dynamic PPT loading is complete, this parameter will change to true.
ZegoLogConfig
Log configuration options
Details
Local log level, the higher the level, the less logs are printed
Properties
logLevel
logLevel: 'debug' | 'info' | 'warn' | 'error' | 'report' | 'disable' Local log level, the higher the level, the less logs are printed
ZegoSuperBoardCacheFileCallBack
Preload static file progress callback
- Caution: Valid only when the cache file type is static
Properties
data
ZegoSuperBoardCacheModel
Advance request file resource situation
Properties
totalFileNum
totalFileNum: number The total number of pre-requested resources for the file
failedFileNum
failedFileNum: number The number of failed pre-requests for the file
ZegoSuperBoardCursorTitleStyle
Cursor custom text information
Details
Cursor custom text information Business scenario: Available when you need to display cursor custom text
Properties
title
title: string Cursor custom text content
- Required: no
- Default value: ""
- Recommended value: User login name display
- Value range: 15 characters or less
bold
bold: boolean Whether the cursor custom text is bold
- Required: no
- Default value: false
italic
italic: boolean Whether the cursor custom text is italic
- Required: no
- Default value: false
size
size: number Cursor custom text font size
- Required: 否
- Default value: 16
- Value range: 12-20
color
color: number Cursor custom text font color
- Required: no
- Default value: white
backgroundColor
backgroundColor: number Cursor custom text font background color
- Required: no
position
position: ZegoSuperBoardCursorTitlePosition Customize the position of the text relative to the cursor
- Required: no
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
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: number ZEGO application ID for developers, please apply from ZEGO management console.
Required or not: Mandatory
Reference range: 0-4294967295.
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.
parentDomID
parentDomID: string display the ID of the parent container of the target view of the subView
- Required: yes
- Caution: When adding subView to the view, you must confirm that the parent container positioning method needs to be relative positioning and the physical size is not 0
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: 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: string cache directory
logFolder
logFolder: string log directory
ZegoSuperBoardKeydownModel
Details
The keypad information pressed when clicking on the dynamic PPT
Properties
type
type: string Keyboard event type, returns 'keydown' .
code
code: string The physical keycode of the key that triggered the event. For example, "KeyA" means the A key.
ctrlKey
ctrlKey: boolean When the keyboard event is triggered, whether the Ctrl key is pressed at the same time. If the Ctrl key is pressed, it is true, otherwise it is false.
key
key: string The character of the key that triggered the event. For example, pressing the A key returns "A", and pressing the Enter key returns "Enter".
keyCode
keyCode: number The keyboard code of the key that triggered the event. This was an attribute used to identify keyboard keys in the early JavaScript event object, but it has been replaced by the code attribute. For information on the correspondence between keyCode and keys, please refer to the MDN Web Docs KeyboardEvent.keyCode.
shiftKey
shiftKey: boolean When the keyboard event is triggered, whether the Shift key is pressed at the same time, if the Shift key is pressed, it is true, otherwise it is false.
metaKey
metaKey: boolean When the keyboard event is triggered, whether the Meta key is pressed at the same time. If the Meta key is pressed, it is true, otherwise it is false. The Meta key is the Windows key in Windows operating systems and the Command key in macOS.
altKey
altKey: boolean When the keyboard event is triggered, whether the Alt key is pressed at the same time. If the Alt key is pressed, it is true, otherwise it is false.
page
page: number Current page number.
step
step: number Current step number.
maxStep
maxStep: number Maximum number of steps on this page.
ZegoSuperBoardLoadFileModel
The result returned by the preview file loading callback.
Details
The result returned by the preview file loading callback.
Properties
parent
parent: string parentDomID
fileID
fileID: string preview FileID
fileName
fileName: string The filename of previewFile
fileType
pageCount
pageCount: number The number of pages of file content.
width
width: number The width of preview file
height
height: number The height of preview file
viewID
viewID: string The ID of the whiteboard mounting container.
sheets
sheets: string[] The list of Sheets contained in Excel.
name
name: string filename of Excel
seq
seq: number Server-side sequence number.
fileHash
fileHash: string The hash of file content
fileUrls
fileUrls: string[] List of file url
ZegoSuperBoardMediaModel
Abnormal audio and video information played in dynamic PPT
Properties
id
id: string Resource Node ID
type
type: string Resource type, returning 'video' or 'audio'
fileType
ct
ct: number Playback progress, if the type is' video ', it will return
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
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
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: string Name of SuperBoardSubView
createTime
createTime: number Whiteboard Creation Time Unix timestamp (milliseconds)
fileID
fileID: string File ID, which is unique
fileType
uniqueID
uniqueID: string SuperBoardSubview ID, This ID is unique.
whiteboardIDList
whiteboardIDList: string[] A list of whiteboard IDs
ZegoSuperBoardUploadCallback
Upload progress and result callback
Properties
data
ZegoSuperBoardUploadH5FileCallback
Callback generated by uploading a custom H5 file
Properties
data
ZegoSuperBoardUploadModel
Related parameters returned by the callback generated by the uploadFile method
Properties
status
uploadPercent
uploadPercent: number Upload progress
fileID
fileID: string The fileID will be available after the conversion is completed
fileHash
fileHash: string File content hash
taskID
taskID: string File transcoding task ID
loaded
loaded: number The length of the uploaded data, in Bytes, exists in the file upload.
total
total: number The total length of data expected to be uploaded, in Bytes, exists in the file upload.
ZegoSuperPreviewView
The relevant parameters of the return values of createPreviewFIleView, getCurrentPreview, and getPreviewList.
Details
The relevant parameters of the return values of createPreviewFIleView, getCurrentPreview, and getPreviewList.
Methods
flipPage
flipPage(page: number, step?: number): voidParameters
| Name | Type | Description |
|---|---|---|
| page | number | Jump to the target page. The page numbers start from 1. |
| step | number | The step number on the target page, starting from 1. |
Details
Jump to the specified step of the specified slide in the dynamic PPT
- Available since: 2.19.0
getContentSize
getContentSize(): SizeGet the width and height of the document content。
- Available since: 2.19.0
The width and height of the document content.
getCurrentPage
getCurrentPage(): numberGet the page number of the currently displayed file.
- Available since: since 2.19.0
The page number of the currently displayed file.
getFileID
getFileID(): stringGet the file ID
- Available since: since 2.19.0
file ID
getFileType
getFileType(): ZegoSuperBoardPreviewFileTypeGet the file type
- Available since: since 2.19.0
The numbers corresponding to the file types.
getPPTNotes
getPPTNotes(page: number): stringParameters
| Name | Type | Description |
|---|---|---|
| page | number | The specified page number. The page numbers start from 1. |
Details
Get the remarks on the specified page of the PPT.
- Available since: 2.19.0
Return
The remarks of this page. If there are no remarks, an empty string ("") will be returned.
getPageCount
getPageCount(): numberGet the total number of pages of the currently loaded file.
- Available since: since 2.19.0
The total number of pages of the currently loaded file.
getThumbnailUrlList
getThumbnailUrlList(): Array<string>Get the list of thumbnails of the current file. Only PDF, PPT, and dynamic PPT file formats are supported.
- Available since: 2.19.0
The list of file thumbnail URLs.
getVerticalPercent
getVerticalPercent(): numberGet the percentage of the current vertical offset (vertical scroll bar
- Available since: 2.19.0
The percentage of the current vertical offset (vertical scroll bar), with a value range from 0.00 to 1.00.
getVisibleSize
getVisibleSize(): SizeThe width and height of the visible area of the current file, that is, the size of the visible area under the current View, not the original Size.
- Available since: 2.19.0
The width and height of the visible area of the current file, which is the size of the visible area under the current View, not the original size.
loadFile
loadFile(fileID: string, authKey: string, listener?: onLoadFileCallBack, loadOption: ZegoLoadOption): voidParameters
| Name | Type | Description |
|---|---|---|
| fileID | string | file ID |
| authKey | string | The authentication key. |
| listener | onLoadFileCallBack | Listen for the preview file loading operation. |
| loadOption | ZegoLoadOption | Load file configuration items. |
Details
Load and render the file.
- Available since: since 2.19.0
nextStep
nextStep(): voidThe next step of the dynamic PPT.
- Available since: 2.19.0
onLoadFileCallBack
onLoadFileCallBack(data: ZegoSuperBoardLoadFileModel): voidParameters
| Name | Type | Description |
|---|---|---|
| data | ZegoSuperBoardLoadFileModel | The result returned by the preview file loading callback. |
Details
Preview file loading callback。
- Available since: since 2.19.0
playAnimation
playAnimation(animationInfo: number): voidParameters
| Name | Type | Description |
|---|---|---|
| animationInfo | number | The information about playing the animations |
Details
When the user directly clicks on an element with animations in a dynamic PPT, the onPlayAnimation(String animationInfo) callback will be triggered. The parameter animationInfo here contains the information about playing that animation. By passing this parameter into the playAnimation(String animationInfo) method, the same animation playback effect can be achieved. ( After the playAnimation method is executed, the onPlayAnimation callback will not be generated.
- Available since: since 2.19.0
previousStep
previousStep(): voidReturn to the previous step of the PPT.
- Available since: 2.19.0
reloadView
reloadView(options: ReloadOptions): voidParameters
| Name | Type | Description |
|---|---|---|
| options | ReloadOptions | Configuration for reloading. |
Details
Reload the file View
- Available since: since 2.19.0
scrollTo
scrollTo(verticalPercent: number): voidParameters
| Name | Type | Description |
|---|---|---|
| verticalPercent | number | The parameter value range is 0.00 to 1.00. For example, to jump to the halfway point of the file, enter a parameter value of 0.50. |
Details
Jump to a specific position in the file by percentage.
- Available since: 2.19.0
setScaleFactor
setScaleFactor(scaleFactor: number, scaleOffsetX: number, scaleOffsetY: number): voidParameters
| Name | Type | Description |
|---|---|---|
| scaleFactor | number | Scaling ratio. The number shall be greater than 1. |
| scaleOffsetX | number | Zoom offset X |
| scaleOffsetY | number | Zoom offset Y |
Details
Zoom the current preview view.
- Available since: since 2.19.0
stopPlay
stopPlay(pageNumber: number): voidParameters
| Name | Type | Description |
|---|---|---|
| pageNumber | number | When the value of pageNumber is 0, it means stopping the audio and video playback on the current page. Otherwise, it means stopping the audio and video playback on the specified page. |
Details
The usage scenario of this interface is generally to stop the audio and video playback of the previous dynamic PPT file when switching files.
- Available since: since 2.19.0
switchSheet
switchSheet(index: number): voidParameters
| Name | Type | Description |
|---|---|---|
| index | number | The index represents the sheet index, starting from 0. |
Details
Switch the Excel file to the specified sheet.
- Available since: 2.19.0
unloadFile
unloadFile(): voidUnload the file from the view.
- When to call /Trigger: After the [loadFile] is called successfully.
- Available since: 2.19.0
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: number Customize the width of H5 courseware
Required or not: Mandatory
- Value range: Greater than 0
- Available since: v2.0.0
height
height: number Customize the height of H5 courseware.
Required or not: Mandatory
- Value range: Greater than 0
- Available since: v2.0.0
pageCount
pageCount: number Customize the number of pages of H5 courseware.
- Available since: v2.0.0
thumbnailList
thumbnailList: string[] Customize H5 courseware thumbnail relative path array.
- Required: optional parameters
- Available since: v2.0.0
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
