Fix for Firefox full screen (fixes #343)

This commit is contained in:
Sam
2016-08-23 00:34:43 +10:00
parent 19ca906e50
commit 6694c1e6cf
7 changed files with 16 additions and 11 deletions

View File

@ -1,6 +1,6 @@
// ==========================================================================
// Plyr
// plyr.js v2.0.3
// plyr.js v2.0.4
// https://github.com/selz/plyr
// License: The MIT License (MIT)
// ==========================================================================
@ -43,7 +43,7 @@
displayDuration: true,
loadSprite: true,
iconPrefix: 'plyr',
iconUrl: 'https://cdn.plyr.io/2.0.3/plyr.svg',
iconUrl: 'https://cdn.plyr.io/2.0.4/plyr.svg',
clickToPlay: true,
hideControls: true,
showPosterOnEnd: false,
@ -620,7 +620,7 @@
element: null,
prefix: ''
},
browserPrefixes = 'webkit o ms khtml'.split(' ');
browserPrefixes = 'webkit o moz ms khtml'.split(' ');
// Check for native support
if (!_is.undefined(document.cancelFullScreen)) {
@ -657,6 +657,8 @@
switch (this.prefix) {
case '':
return document.fullscreenElement === element;
case 'moz':
return document.mozFullScreenElement === element;
default:
return document[this.prefix + 'FullscreenElement'] === element;
}