After whiteboard is created successfully, calling the page turn interface does not take effect?
Problem Description
After the whiteboard is created successfully, calling the page turn interface to turn pages, the whiteboard fails to turn to the specified page.
Problem Cause
For multi-page whiteboards, if the ratio of aspectWidth to aspectHeight and pageCount passed when creating the whiteboard do not meet the requirements (for example, aspectWidth is not a multiple of pageCount), resulting in a non-multi-page whiteboard being created, the phenomenon of inability to turn pages will occur.
Solution
Ensure that the passed aspectWidth, aspectHeight, and pageCount parameters are valid and aspectWidth is the value of single page width multiplied by pageCount.
Taking the Web platform as an example, the example of creating a ZegoWhiteboardView with a width of 1600 px, height of 900 px, and 5 pages horizontally is as follows:
const zegoWhiteboardView = await zegoExpressEngine.createView({
roomID: 'Login room number',
name: 'Whiteboard name',
aspectWidth: 1600 * 5,
aspectHeight: 900,
pageCount: 5,
fileInfo?: {
fileID: 'File ID',
fileName: 'File name',
fileType: 'File type',
authKey: ''
}
})