1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-02 06:32:07 +02:00

Made full window mode more independent

This commit is contained in:
Steve Heffernan 2012-01-14 18:03:37 -08:00
parent 3c21510d72
commit e6967528cc

View File

@ -539,7 +539,7 @@ _V_.Player = _V_.Component.extend({
},
enterFullWindow: function(){
this.videoIsFullScreen = true;
this.videoIsFullWindow = true;
// Storing original doc overflow value to return to when fullscreen is off
this.docOrigOverflow = document.documentElement.style.overflow;
@ -559,12 +559,16 @@ _V_.Player = _V_.Component.extend({
fullWindowOnEscKey: function(event){
if (event.keyCode == 27) {
this.cancelFullScreen();
if (this.videoIsFullScreen == true) {
this.cancelFullScreen();
} else {
this.exitFullWindow();
}
}
},
exitFullWindow: function(){
this.videoIsFullScreen = false;
this.videoIsFullWindow = false;
_V_.removeEvent(document, "keydown", this.fullWindowOnEscKey);
// Unhide scroll bars.