mirror of
https://github.com/videojs/video.js.git
synced 2025-01-21 11:02:08 +02:00
Made full window mode more independent
This commit is contained in:
parent
3c21510d72
commit
e6967528cc
@ -539,7 +539,7 @@ _V_.Player = _V_.Component.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
enterFullWindow: function(){
|
enterFullWindow: function(){
|
||||||
this.videoIsFullScreen = true;
|
this.videoIsFullWindow = true;
|
||||||
|
|
||||||
// Storing original doc overflow value to return to when fullscreen is off
|
// Storing original doc overflow value to return to when fullscreen is off
|
||||||
this.docOrigOverflow = document.documentElement.style.overflow;
|
this.docOrigOverflow = document.documentElement.style.overflow;
|
||||||
@ -559,12 +559,16 @@ _V_.Player = _V_.Component.extend({
|
|||||||
|
|
||||||
fullWindowOnEscKey: function(event){
|
fullWindowOnEscKey: function(event){
|
||||||
if (event.keyCode == 27) {
|
if (event.keyCode == 27) {
|
||||||
|
if (this.videoIsFullScreen == true) {
|
||||||
this.cancelFullScreen();
|
this.cancelFullScreen();
|
||||||
|
} else {
|
||||||
|
this.exitFullWindow();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
exitFullWindow: function(){
|
exitFullWindow: function(){
|
||||||
this.videoIsFullScreen = false;
|
this.videoIsFullWindow = false;
|
||||||
_V_.removeEvent(document, "keydown", this.fullWindowOnEscKey);
|
_V_.removeEvent(document, "keydown", this.fullWindowOnEscKey);
|
||||||
|
|
||||||
// Unhide scroll bars.
|
// Unhide scroll bars.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user