I have been working with the fullscreen API for 5-6months now. The fullscreenchange event is very unreliable in windows safari. I know what events get triggered after fullscreen is requested thanks to this post Fullscreen API: Which events are fired?. I have made sure to handle all of them. But at times, windows safari doesn't trigger it at all. Also at times, it does not go to fullscreen at all. My entire functionality is handled in this callback. Any suggestions would be helpful.
Here is how I handle it
jQuery(document).on("fullscreenchange mozfullscreenchange webkitfullscreenchange MSFullscreenChange", function() {
if (document.webkitFullscreenElement || document.mozFullScreenElement || document.fullscreenElement ||
document.msFullscreenElement || document.webkitIsFullScreen) {
self.createViewer();
} else {
self.destroyViewer();
}
});