1
0
mirror of https://github.com/videojs/video.js.git synced 2025-07-05 00:58:52 +02:00

@gkatsev fixed isFullscreen reporting on iOS devices. closes #1511

Squashed commit of the following:

commit 02fe7a40d0
Author: Gary Katsevman <git@gkatsev.com>
Date:   Tue Sep 23 14:15:08 2014 -0400

    Feature detect old fullscreen instead of UA switch

commit f3eccbbe67
Author: Gary Katsevman <git@gkatsev.com>
Date:   Mon Sep 22 21:31:34 2014 -0400

    No need for if since assume we're in fs

commit 0498b10084
Author: Gary Katsevman <git@gkatsev.com>
Date:   Mon Sep 22 21:28:10 2014 -0400

    Revert "Don't trigget vjs's fullscreenchange event"

    This reverts commit cc45177ee5.

    Conflicts:
    	src/js/media/html5.js

commit 1ed30853ef
Author: Gary Katsevman <git@gkatsev.com>
Date:   Wed Sep 17 12:00:29 2014 -0400

    Listen via 'this.one'.
    Don't bother checking whether the video element is fullscreen but just
    assume we are fullscreen.

commit 27e2707508
Author: Gary Katsevman <git@gkatsev.com>
Date:   Tue Sep 16 18:12:36 2014 -0400

    Use one for event binding.

commit cc45177ee5
Author: Gary Katsevman <git@gkatsev.com>
Date:   Mon Sep 15 17:28:46 2014 -0400

    Don't trigget vjs's fullscreenchange event
    This event isn't really being used for this usecase right now, so, no
    need to trigger it.

commit ad505a6807
Author: Gary Katsevman <git@gkatsev.com>
Date:   Mon Sep 15 16:45:48 2014 -0400

    Update exports for request & cancel fullscreen

commit e423635b6c
Author: Gary Katsevman <git@gkatsev.com>
Date:   Mon Sep 15 16:15:10 2014 -0400

    On iOS, use ios specific enterFullscreen methods.

commit fe4a8fbf6a
Author: Gary Katsevman <git@gkatsev.com>
Date:   Mon Sep 15 14:53:20 2014 -0400

    Export isFullScreen correctly. Export isFullscreen as well.
This commit is contained in:
Gary Katsevman
2014-09-23 15:15:45 -07:00
committed by Steve Heffernan
parent 72cb71c3a5
commit d43831d6d0
3 changed files with 21 additions and 4 deletions

View File

@ -209,6 +209,20 @@ vjs.Html5.prototype.supportsFullScreen = function(){
vjs.Html5.prototype.enterFullScreen = function(){
var video = this.el_;
if ('webkitDisplayingFullscreen' in video) {
this.one('webkitbeginfullscreen', vjs.bind(this, function(e) {
this.player_.isFullscreen(true);
this.one('webkitendfullscreen', vjs.bind(this, function(e) {
this.player_.isFullscreen(false);
this.player_.trigger('fullscreenchange');
}));
this.player_.trigger('fullscreenchange');
}));
}
if (video.paused && video.networkState <= video.HAVE_METADATA) {
// attempt to prime the video element for programmatic access
// this isn't necessary on the desktop but shouldn't hurt