logo
On this page

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

2021-09-09
Products / Plugins:Interactive whiteboard
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 zegoWhiteboardView to reload the whiteboard to adapt to the current whiteboard container size.

document.addEventListener('fullscreenchange', function(e) {
    zegoWhiteboardView.reloadView();
});
Note

requestFullScreen has significant differences in implementation across browsers, and some mobile browsers do not support it. If you need to implement fullscreen effects 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

How to solve Metal-related crash when debugging on iOS 12 physical device?

Next

Why can't the page turn when clicking on the dynamic PPT file page?

On this page

Back to top