Skip to content

Commit

Permalink
Added listeners for enter/exit full screen/window.
Browse files Browse the repository at this point in the history
  • Loading branch information
heff committed Feb 18, 2011
1 parent f31aec1 commit 88ce51a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dev/src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,15 @@ VideoJS.fn.extend({
} else {
this.enterFullWindow();
}
this.triggerListeners("enterFullScreen");
return this;
},

exitFullScreen: function(){
if (!this.supportsFullScreen()) {
this.exitFullWindow();
}
this.triggerListeners("exitFullScreen");
// Otherwise Shouldn't be called since native fullscreen uses own controls.
return this;
},
Expand All @@ -134,6 +136,7 @@ VideoJS.fn.extend({
_V_.addClass(this.box, "vjs-fullscreen");
// Resize the box, controller, and poster
this.positionAll();
this.triggerListeners("enterFullWindow");
},

exitFullWindow: function(){
Expand All @@ -146,5 +149,6 @@ VideoJS.fn.extend({
_V_.removeClass(this.box, "vjs-fullscreen");
// Resize the box, controller, and poster to original sizes
this.positionAll();
this.triggerListeners("exitFullWindow");
}
});

0 comments on commit 88ce51a

Please sign in to comment.