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: commit02fe7a40d0
Author: Gary Katsevman <git@gkatsev.com> Date: Tue Sep 23 14:15:08 2014 -0400 Feature detect old fullscreen instead of UA switch commitf3eccbbe67
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 commit0498b10084
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 commitcc45177ee5
. Conflicts: src/js/media/html5.js commit1ed30853ef
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. commit27e2707508
Author: Gary Katsevman <git@gkatsev.com> Date: Tue Sep 16 18:12:36 2014 -0400 Use one for event binding. commitcc45177ee5
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. commitad505a6807
Author: Gary Katsevman <git@gkatsev.com> Date: Mon Sep 15 16:45:48 2014 -0400 Update exports for request & cancel fullscreen commite423635b6c
Author: Gary Katsevman <git@gkatsev.com> Date: Mon Sep 15 16:15:10 2014 -0400 On iOS, use ios specific enterFullscreen methods. commitfe4a8fbf6a
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:
committed by
Steve Heffernan
parent
72cb71c3a5
commit
d43831d6d0
@ -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
|
||||
|
Reference in New Issue
Block a user