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

Clear timeout for second fullscreen stretch attempt #812

Merged
merged 1 commit into from Apr 9, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/js/mep-feature-fullscreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@
player.exitFullScreen();
},

containerSizeTimeout: null,

enterFullScreen: function() {

var t = this;
Expand Down Expand Up @@ -353,7 +355,7 @@
// Only needed for safari 5.1 native full screen, can cause display issues elsewhere
// Actually, it seems to be needed for IE8, too
//if (mejs.MediaFeatures.hasTrueNativeFullScreen) {
setTimeout(function() {
t.containerSizeTimeout = setTimeout(function() {
t.container.css({width: '100%', height: '100%'});
t.setControlsSize();
}, 500);
Expand Down Expand Up @@ -391,6 +393,9 @@

var t = this;

// Prevent container from attempting to stretch a second time
clearTimeout(t.containerSizeTimeout);

// firefox can't adjust plugins
if (t.media.pluginType !== 'native' && mejs.MediaFeatures.isFirefox) {
t.media.setFullscreen(false);
Expand Down