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
Problems when restoring from full-screen view #497
Comments
Actually I see a similar issue with the player on the video.js website. The behavior changes based on whether you initiate fullscreen mode toggles from the control bar button or the browsers fullscreen permission dialog. Using ESC does not restore properly, but using the fullscreen control button does. This worked in prior versions. |
@kholbrook-sonardesign Which browser/platform? |
None of these work correctly. FireFox 20.0.1 Win7 |
Ah, I see. Hitting the esc button to exit fullscreen is broken. On May 9, 2013, at 1:51 PM, Kevin notifications@github.com wrote:
|
I can confirm the same problem in Mac/Chrome v26 and Firefox v20. |
Same issue here. I've recorded a quick video of what's happening http://www.youtube.com/watch?v=gilKeCj6g3E OS X: Version 10.8.2 Same issue occurring in every browser I've tested. In Safari it actually shrinks back correctly, but then immediately opens fullsize within the browser window. |
the fullscreenchange event does not get triggered when pressing esc so the .vjs-fullscreen class is not removed in player.js:395. a trigger('fullscreenchange') added to player.js:602 seems to solve the problem but i haven't tested it properly so far. |
Same issue on OS x 10.8.2 with safari Version 6.0.4 (8536.29.13) and Chrome Version 26.0.1410.65. Even on the homepage if i click esc on fullscreen mode it goes to full-window mode as opposed to normal window model. Looking forward to a fix. |
Not sure if this is related, but my behavior from quitting full screen results in
Firefox and Chrome, Ubuntu 12.04 Started as a 640x480 video, became full screen, then if it comes back and it's huge! |
Same on my ubuntu machine / chrome. |
+1 here Tested with:
|
+1 here Tested with: Windows 7/8 x64/x32, Chrome v27 |
Use Browser Exit full screen button and not button embed in video player to exit full screen |
@ravionrails For me it's the exact opposite: If I use the ESC button (so the exit full screen button of the respective browser) I discover the mentioned behaviour. Everything is fine if I use the player button. |
ESC button triggers Browser button and it leads to Full screen in browser window, it doesn't resizes to original position, is there any solution for this bug. |
I have a WordPress plugin that uses Video.js as a player and with some help from John Dyer I was able to make a hack for this problem by removing the vjs-fullscreen class in browsers that use the fullscreen API. It seems like only browsers that don't support the real fullscreen API need that class. Here's the relevant code I used: player.on('fullscreenchange', function(){
var
fullScreenApi = {
supportsFullScreen: false,
isFullScreen: function() { return false; },
requestFullScreen: function() {},
cancelFullScreen: function() {},
fullScreenEventName: '',
prefix: ''
},
browserPrefixes = 'webkit moz o ms khtml'.split(' ');
// check for native support
if (typeof document.cancelFullScreen != 'undefined') {
fullScreenApi.supportsFullScreen = true;
} else {
// check for fullscreen support by vendor prefix
for (var i = 0, il = browserPrefixes.length; i < il; i++ ) {
fullScreenApi.prefix = browserPrefixes[i];
if (typeof document[fullScreenApi.prefix + 'CancelFullScreen' ] != 'undefined' ) {
fullScreenApi.supportsFullScreen = true;
break;
}
}
}
if ( fullScreenApi.supportsFullScreen == true ) { jQuery(player).removeClass('vjs-fullscreen'); }
}); |
Moved `fullscreenchange` triggering to document event listener. Removed hack for supporting older firefox versions that would break when resizing flash to fullscreen. Added a quick fix for a Safari event property warning (layerX). Added some props to the tests media faker to support fullscreen tests, however ran into issues auto tesing fullscreen so we don't have real fullscreen tests yet.
I have a fix in a branch if anyone wants to verify it before I push it out to the CDN. heff@88a75fd |
When will the fix be pushed to CDN? |
It's available now at http://vjs.zencdn.net/4.0.3/video.js Doing more testing before overwriting /4.0/ On May 28, 2013, at 3:40 PM, Rich Jones notifications@github.com wrote:
|
Found during a test pass of the new videojs skin.
STR:
Expected:
The player restores back to its non-full-window mode.
The full-screen button changes to an arrows-out icon.
Actual:
The player restores instead to full-window mode.
The button remains an arrows-in icon.
The player in the videojs.com home page does not exhibit this behavior. That player does restore to the non-full-window mode as expected, and the icon does change to an arrows-out icon.
The text was updated successfully, but these errors were encountered: