mirror of
https://github.com/videojs/video.js.git
synced 2025-04-23 12:19:08 +02:00
Added listeners for enter/exit full screen/window.
This commit is contained in:
parent
f31aec1717
commit
88ce51a175
@ -109,6 +109,7 @@ VideoJS.fn.extend({
|
|||||||
} else {
|
} else {
|
||||||
this.enterFullWindow();
|
this.enterFullWindow();
|
||||||
}
|
}
|
||||||
|
this.triggerListeners("enterFullScreen");
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -116,6 +117,7 @@ VideoJS.fn.extend({
|
|||||||
if (!this.supportsFullScreen()) {
|
if (!this.supportsFullScreen()) {
|
||||||
this.exitFullWindow();
|
this.exitFullWindow();
|
||||||
}
|
}
|
||||||
|
this.triggerListeners("exitFullScreen");
|
||||||
// Otherwise Shouldn't be called since native fullscreen uses own controls.
|
// Otherwise Shouldn't be called since native fullscreen uses own controls.
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
@ -134,6 +136,7 @@ VideoJS.fn.extend({
|
|||||||
_V_.addClass(this.box, "vjs-fullscreen");
|
_V_.addClass(this.box, "vjs-fullscreen");
|
||||||
// Resize the box, controller, and poster
|
// Resize the box, controller, and poster
|
||||||
this.positionAll();
|
this.positionAll();
|
||||||
|
this.triggerListeners("enterFullWindow");
|
||||||
},
|
},
|
||||||
|
|
||||||
exitFullWindow: function(){
|
exitFullWindow: function(){
|
||||||
@ -146,5 +149,6 @@ VideoJS.fn.extend({
|
|||||||
_V_.removeClass(this.box, "vjs-fullscreen");
|
_V_.removeClass(this.box, "vjs-fullscreen");
|
||||||
// Resize the box, controller, and poster to original sizes
|
// Resize the box, controller, and poster to original sizes
|
||||||
this.positionAll();
|
this.positionAll();
|
||||||
|
this.triggerListeners("exitFullWindow");
|
||||||
}
|
}
|
||||||
});
|
});
|
Loading…
x
Reference in New Issue
Block a user