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,5 +1,8 @@
# Changelog # Changelog
## v2.0.4
- Fix for Firefox full screen (fixes #343)
## v2.0.3 ## v2.0.3
- Set 'global' keyboard shortcut option to false as default, added `<textarea>` to editable elements to be ignored. - Set 'global' keyboard shortcut option to false as default, added `<textarea>` to editable elements to be ignored.

2
demo/dist/demo.css vendored

File diff suppressed because one or more lines are too long

2
dist/plyr.css vendored

File diff suppressed because one or more lines are too long

4
dist/plyr.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{ {
"name": "plyr", "name": "plyr",
"version": "2.0.3", "version": "2.0.4",
"description": "A simple, accessible and customizable HTML5, YouTube and Vimeo media player", "description": "A simple, accessible and customizable HTML5, YouTube and Vimeo media player",
"homepage": "http://plyr.io", "homepage": "http://plyr.io",
"main": "src/js/plyr.js", "main": "src/js/plyr.js",

View File

@ -122,7 +122,7 @@ Include the `plyr.js` script before the closing `</body>` tag and then call `ply
If you want to use our CDN for the JavaScript, you can use the following: If you want to use our CDN for the JavaScript, you can use the following:
```html ```html
<script src="https://cdn.plyr.io/2.0.3/plyr.js"></script> <script src="https://cdn.plyr.io/2.0.4/plyr.js"></script>
``` ```
### CSS ### CSS
@ -135,11 +135,11 @@ Include the `plyr.css` stylsheet into your `<head>`
If you want to use our CDN for the default CSS, you can use the following: If you want to use our CDN for the default CSS, you can use the following:
```html ```html
<link rel="stylesheet" href="https://cdn.plyr.io/2.0.3/plyr.css"> <link rel="stylesheet" href="https://cdn.plyr.io/2.0.4/plyr.css">
``` ```
### SVG Sprite ### SVG Sprite
The SVG sprite is loaded automatically from our CDN. To change this, see the [options](#Options) below. For reference, the CDN hosted SVG sprite can be found at `https://cdn.plyr.io/2.0.3/plyr.svg`. The SVG sprite is loaded automatically from our CDN. To change this, see the [options](#Options) below. For reference, the CDN hosted SVG sprite can be found at `https://cdn.plyr.io/2.0.4/plyr.svg`.
## Advanced ## Advanced

View File

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