Skip to content

Commit

Permalink
Listen via 'this.one'.
Browse files Browse the repository at this point in the history
Don't bother checking whether the video element is fullscreen but just
assume we are fullscreen.
  • Loading branch information
gkatsev committed Sep 17, 2014
1 parent 27e2707 commit 1ed3085
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/js/media/html5.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,11 @@ vjs.Html5.prototype.enterFullScreen = function(){
var video = this.el_;

if (vjs.IS_IOS) {
vjs.one(video, 'webkitbeginfullscreen', vjs.bind(this, function(e) {
this.player_.isFullscreen(video['webkitDisplayingFullscreen']);
this.one('webkitbeginfullscreen', vjs.bind(this, function(e) {
this.player_.isFullscreen(true);
if (this.player_.isFullscreen()) {
vjs.one(video, 'webkitendfullscreen', vjs.bind(this, function(e) {
this.player_.isFullscreen(video['webkitDisplayingFullscreen']);
this.one('webkitendfullscreen', vjs.bind(this, function(e) {
this.player_.isFullscreen(false);
}));
}
}));
Expand Down

0 comments on commit 1ed3085

Please sign in to comment.