logo
On this page

How to display the whiteboard normally when the browser window is in fullscreen mode?

2021-09-09
Products / Plugins:Super Board
Platform / Framework:Web

Problem Description

When the browser window switches to fullscreen display, if the whiteboard is not processed after the switch, the whiteboard display content will be abnormal. To display the whiteboard normally, some processing is required after fullscreen display.

Solution

When the whiteboard switches to fullscreen, use the requestFullScreen API + "fullscreenchange" event listener. In the listening callback of the whiteboard fullscreen switch, call the reloadView| interface of ZegoSuperBoardSubView to reload the whiteboard to adapt to the current whiteboard container size.

document.addEventListener('fullscreenchange', function(e) {
// zegoSuperBoardSubView is the currently displayed whiteboard
    zegoSuperBoardSubView.reloadView();
});
Note

requestFullScreen has significant differences in implementation across browsers, and some mobile browsers do not support it. If you need to implement fullscreen effect in mobile browsers, make sure you can correctly switch to fullscreen and call the reloadView interface after the whiteboard mount node size change is complete.

Previous

What do you need to do before using interactive whiteboard?

Next

Is the token of File Sharing SDK compatible with the token of Interactive Whiteboard SDK?

On this page

Back to top