mirror of
https://github.com/videojs/video.js.git
synced 2025-02-04 11:43:27 +02:00
Updated fullscreenchange event to trigger on users escape
This commit is contained in:
parent
168ae2cbe8
commit
765ef8e93e
@ -584,6 +584,7 @@ _V_.Player = _V_.Component.extend({
|
||||
// In case the user presses escape to exit fullscreen, we need to update fullscreen status
|
||||
_V_.addEvent(document, requestFullScreen.eventName, this.proxy(function(){
|
||||
this.isFullScreen = document[requestFullScreen.isFullScreen];
|
||||
this.triggerEvent("fullscreenchange");
|
||||
}));
|
||||
|
||||
} else if (this.tech.supportsFullScreen()) {
|
||||
@ -601,6 +602,8 @@ _V_.Player = _V_.Component.extend({
|
||||
cancelFullScreen: function(){
|
||||
var requestFullScreen = _V_.support.requestFullScreen;
|
||||
|
||||
this.isFullScreen = false;
|
||||
|
||||
// Check for browser element fullscreen support
|
||||
if (requestFullScreen) {
|
||||
|
||||
@ -624,14 +627,13 @@ _V_.Player = _V_.Component.extend({
|
||||
|
||||
} else if (this.tech.supportsFullScreen()) {
|
||||
this.techCall("exitFullScreen");
|
||||
this.triggerEvent("fullscreenchange");
|
||||
|
||||
} else {
|
||||
this.exitFullWindow();
|
||||
this.triggerEvent("fullscreenchange");
|
||||
}
|
||||
|
||||
this.isFullScreen = false;
|
||||
this.triggerEvent("fullscreenchange");
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user