Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for IE11 fullscreen API #673

Closed
heff opened this issue Aug 6, 2013 · 14 comments
Closed

Add support for IE11 fullscreen API #673

heff opened this issue Aug 6, 2013 · 14 comments

Comments

@heff
Copy link
Member

heff commented Aug 6, 2013

Mentioned in #621

The docs are now available.
http://msdn.microsoft.com/en-us/library/ie/dn265028(v=vs.85).aspx

@gkatsev
Copy link
Member

gkatsev commented Aug 6, 2013

of course they had to add this prefixed...

@heff
Copy link
Member Author

heff commented Aug 6, 2013

😞

@cabal
Copy link

cabal commented Dec 30, 2013

Following code in player.js should work

  } else {

    if (document.mozCancelFullScreen) {
      prefix = 'moz';
      requestFS.isFullScreen = prefix + 'FullScreen';
      requestFS.eventName = prefix + 'fullscreenchange';
    } else if (document.msExitFullscreen) {
      requestFS.cancelFn = 'msExitFullscreen';
      requestFS.isFullScreen = 'msFullscreenElement';
      requestFS.requestFn = 'msRequestFullscreen';
      requestFS.eventName = 'MSFullscreenChange';
    } else {
      prefix = 'webkit';
      requestFS.isFullScreen = prefix + 'IsFullScreen';
      requestFS.eventName = prefix + 'fullscreenchange';
    }

    if (div[prefix + 'RequestFullScreen']) {
      requestFS.requestFn = prefix + 'RequestFullScreen';
      requestFS.cancelFn = prefix + 'CancelFullScreen';
    }
  }

@heff
Copy link
Member Author

heff commented Dec 30, 2013

Nice. Want to make a pull request for that?

@cabal
Copy link

cabal commented Dec 31, 2013

No, thanks. I'm too lazy to fork, download, build and run tests:)
I did this change on video.dev.js and tested in IE11. For me it is enough.

@jewel
Copy link

jewel commented Mar 21, 2014

This would be nice for when a video is embedded in an iframe, since in IE11 currently the fullscreen button makes it just grow to the size of the iframe. (For me, the iframe happens to be the same size as the video, so the button is a no-op.)

I will submit a pull request if I can ever get all these npm modules to install. :)

@jewel
Copy link

jewel commented Mar 21, 2014

OK, I've made the change and grunt test passes. When I try to go fullscreen in IE11, it doesn't work with the minified version, but works fine with the video.dev.js. I've verified that the string "msRequestFullscreen" is in both versions, so I'm not sure what could be happening.

Firefox will go fullscreen with either the minified or the dev version, so I don't think it's the minifier.

@mattvaughan
Copy link

@jewel Are you planning on making a pull request in the near future? I also have the issue with iframes and fullscreen in IE11. If you aren't planning on it, I would be happy to. I am surprised this issue isn't getting more attention.

@jewel
Copy link

jewel commented Apr 17, 2014

@m0v0nage I wasn't able to figure out the issue with the minified version, so I just shipped the development version to my users. If you can figure that out (or it's not happening to you) then by all means, submit a pull request.

@mattvaughan
Copy link

After prettifying the minified js file and debugging in IE11, it would seem that the problem comes from the minifier changing document.msExitFullscreen to document.Ud. After it finds that document.Ud is undefined, it moves to the else and tries to use webkit, which fails in IE. I don't have the time or patience to debug the minifier, but I will attempt a few code changes to see if the minifier parses it better.

mattvaughan added a commit to mattvaughan/video.js that referenced this issue Apr 18, 2014
…it to github user @jewel for the code changes. I just rearranged to fix minified generation, though this is another issue to look into.
@mattvaughan
Copy link

Submitted pull request after testing in numerous browsers.

@gkatsev
Copy link
Member

gkatsev commented Apr 18, 2014

@m0v0nage oh, interesting. I wonder if this minifcation issue you've seen is related to some of the fs issues we've seen creep up sometimes.
One other way to deal with it (other than the way you dealt with it) is to just force the minifier to not minify by switching document.msExitFullscreen to be document['msExitFullscreen'].

@mattvaughan
Copy link

@gkatsev That probably would have been a simpler fix. I don't believe that there is any reason that webkit needed to be the default, so it should be harmless. I would be very curious to see what is wrong with the minification program.

@gkatsev
Copy link
Member

gkatsev commented Apr 18, 2014

It's because GCC (google closure compiler) is being run in "advanced" mode which is very vigilant about minifying and mangling all the things. So, unfortunately, to be able to use that mode, you kind of have to change your coding style slightly to compensate for it.

@mmcc mmcc closed this as completed May 19, 2014
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants