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

Problems when restoring from full-screen view #497

Closed
jrw95 opened this issue May 9, 2013 · 19 comments
Closed

Problems when restoring from full-screen view #497

jrw95 opened this issue May 9, 2013 · 19 comments

Comments

@jrw95
Copy link
Contributor

jrw95 commented May 9, 2013

Found during a test pass of the new videojs skin.

STR:

  1. Copy the index.html.example page to index.html and load it in a browser. Note that the player is not loaded in full-window mode.
  2. Start playback, and click the full screen button.
  3. In full-screen mode, click the full-screen button again to restore to the previous mode.

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.

@kholbrook-sonardesign
Copy link

Actually I see a similar issue with the player on the video.js website.
It does not restore from fullscreen mode properly and the video is the wrong size.

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.

@heff
Copy link
Member

heff commented May 9, 2013

@kholbrook-sonardesign Which browser/platform?

@kholbrook-sonardesign
Copy link

None of these work correctly.

FireFox 20.0.1 Win7
Chrome 26.0.1410.64 Win7
Opera12.14 Win7 - (does not enter fullscreen from control bar)
Safari 5.1.7 Win7
IE 10.0.9200 Win7 - (does not enter fullscreen correctly)

@heff
Copy link
Member

heff commented May 9, 2013

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:

None of these work correctly.

FireFox 20.0.1 Win7
Chrome 26.0.1410.64 Win7
Opera12.14 Win7 - (does not enter fullscreen from control bar)
Safari 5.1.7 Win7


Reply to this email directly or view it on GitHub.

@jaredwalters
Copy link

I can confirm the same problem in Mac/Chrome v26 and Firefox v20.

@johnrees
Copy link

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
Chrome: Version 26.0.1410.65

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.

@creichlin
Copy link

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.

@tejinderss
Copy link

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.

@Miserlou
Copy link

Not sure if this is related, but my behavior from quitting full screen results in

Bug
Link: https://openwatch.net/v/8/

Firefox and Chrome, Ubuntu 12.04

Started as a 640x480 video, became full screen, then if it comes back and it's huge!

@ravionrails
Copy link

Same on my ubuntu machine / chrome.
After Full screen,
I hit exit Full Screen browser button
It result in Full window
and then I use Full screen link on video, it goes to Full Screen and then
I hit again the same link and it revert back to normal

@mbusch
Copy link

mbusch commented May 22, 2013

+1 here

Tested with:

  • Windows 7/8 x64, Chrome v26/Firefox v21
  • Ubuntu 12.04 x64, Chrome v26/Firefox v21

@benjipott
Copy link
Contributor

+1 here

Tested with:

Windows 7/8 x64/x32, Chrome v27

@ravionrails
Copy link

Use Browser Exit full screen button and not button embed in video player to exit full screen

@mbusch
Copy link

mbusch commented May 23, 2013

@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.

@ravionrails
Copy link

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.

@kylegilman
Copy link

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'); }

});

heff added a commit to heff/video.js that referenced this issue May 28, 2013
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.
@heff
Copy link
Member

heff commented May 28, 2013

I have a fix in a branch if anyone wants to verify it before I push it out to the CDN. heff@88a75fd

@heff heff closed this as completed in 753ce48 May 28, 2013
@Miserlou
Copy link

When will the fix be pushed to CDN?

@heff
Copy link
Member

heff commented May 28, 2013

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:

When will the fix be pushed to CDN?


Reply to this email directly or view it on GitHub.

@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.
Labels
None yet
Projects
None yet
Development

No branches or pull requests