Fix for iOS 9 throwing error for name property in fullscreen API (fixes #908)

This commit is contained in:
Sam Potts
2018-04-25 19:59:22 +10:00
parent 27407ba021
commit 971e261067
9 changed files with 22 additions and 22 deletions

View File

@ -6992,7 +6992,7 @@ var Fullscreen = function () {
// Get prefix
this.prefix = Fullscreen.prefix;
this.name = Fullscreen.name;
this.property = Fullscreen.property;
// Scroll position
this.scrollPosition = { x: 0, y: 0 };
@ -7056,7 +7056,7 @@ var Fullscreen = function () {
} else if (!this.prefix) {
this.target.requestFullscreen();
} else if (!utils.is.empty(this.prefix)) {
this.target[this.prefix + 'Request' + this.name]();
this.target[this.prefix + 'Request' + this.property]();
}
}
@ -7079,7 +7079,7 @@ var Fullscreen = function () {
(document.cancelFullScreen || document.exitFullscreen).call(document);
} else if (!utils.is.empty(this.prefix)) {
var action = this.prefix === 'moz' ? 'Cancel' : 'Exit';
document['' + this.prefix + action + this.name]();
document['' + this.prefix + action + this.property]();
}
}
@ -7117,7 +7117,7 @@ var Fullscreen = function () {
return utils.hasClass(this.target, this.player.config.classNames.fullscreen.fallback);
}
var element = !this.prefix ? document.fullscreenElement : document['' + this.prefix + this.name + 'Element'];
var element = !this.prefix ? document.fullscreenElement : document['' + this.prefix + this.property + 'Element'];
return element === this.target;
}
@ -7161,7 +7161,7 @@ var Fullscreen = function () {
return value;
}
}, {
key: 'name',
key: 'property',
get: function get() {
return this.prefix === 'moz' ? 'FullScreen' : 'Fullscreen';
}