0

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();
    }
});
Community
  • 1
  • 1
Empty
  • 350
  • 2
  • 4
  • 22
  • I create a viewer for my image. – Empty Sep 02 '14 at 07:25
  • Where do you find that Windows Safari is an ongoing supported browser? I don't see an update in 2.5 years. Also, please don't put multiline code into comments because it's impossible to read. Use the `Edit` link to edit your question and add code to it. – jfriend00 Sep 02 '14 at 07:25
  • @jfriend00 it is... because it works. I have tried opening websites with fullscreen demo in safari. There they have nothing but to show the image. No events getting handled. I have a lot to do inside fullscreen callback. But like I said, at times its very unreliable. – Empty Sep 02 '14 at 07:27
  • Why are you trying to support Windows/Safari? Who is using it any more? As best I can tell it hasn't been updated by Apple in 2.5 years. I think it's a dead product. – jfriend00 Sep 02 '14 at 07:28
  • Well...people still try to support IE8 – Empty Sep 02 '14 at 07:30
  • 1
    There are people in corporations who don't have a choice but to run IE8 on their corporate desktop. I rather doubt anyone is running it by choice as it's a pretty horrible browser by most standards. And, even at that, many are choosing that it is not worth the development effort to support IE8 any more. The only data I can find on Safari 5 (the last version to run on Windows) said 0.3% and that would be both Mac and PCs running that version. I can't believe it's worth your effort to even test on that low a market-share browser. IE8 is many times that in share. – jfriend00 Sep 02 '14 at 07:40

0 Answers0