1
0
mirror of https://github.com/videojs/video.js.git synced 2024-11-28 08:58:46 +02:00

Merge branch 'feature/independent-full-window'

This commit is contained in:
Steve Heffernan 2012-01-14 18:05:29 -08:00
commit 9b881cdf13
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,4 @@
* Made full-window mode more independent
* Added rakefile for release generation
--------------------------------------------------------------------------------
^ ADD NEW CHANGES ABOVE ^

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.