Bug fix for isFullscreen() in Mozilla (Fixes #38)

This commit is contained in:
Sam Potts 2015-04-10 07:16:53 +10:00
parent 3526e322ef
commit 5187311ff0
7 changed files with 20 additions and 15 deletions

View File

@ -1,5 +1,8 @@
# Changelog # Changelog
## v1.1.5
- Fix for incorrect `isFullscreen()` return value in Mozilla (Fixes #38)
## v1.1.4 ## v1.1.4
- Minor bug fixes - Minor bug fixes
@ -9,7 +12,7 @@
## v1.1.2 ## v1.1.2
- Added an onSetup callback option - Added an onSetup callback option
- Added fullscreen API methods toggleFullscreen() (must be user iniated), and isFullscreen() - Added fullscreen API methods `toggleFullscreen()` (must be user iniated), and `isFullscreen()`
## v1.1.1 ## v1.1.1
- Fix for unsupported browser handling - Fix for unsupported browser handling
@ -19,7 +22,7 @@
- Added config option to set which controls are shown (if using the default controls html) and better handling of missing controls - Added config option to set which controls are shown (if using the default controls html) and better handling of missing controls
## v1.0.31 ## v1.0.31
- Display duration on metadataloaded - Display duration on `metadataloaded`
## v1.0.30 ## v1.0.30
- Fixed bug with media longer than 60 minutes (Fixes #69) - Fixed bug with media longer than 60 minutes (Fixes #69)

2
dist/plyr.js vendored

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Docs styles --> <!-- Docs styles -->
<link rel="stylesheet" href="//cdn.plyr.io/1.1.4/docs.css"> <link rel="stylesheet" href="//cdn.plyr.io/1.1.5/docs.css">
</head> </head>
<body> <body>
<main> <main>

View File

@ -8,10 +8,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Styles --> <!-- Styles -->
<link rel="stylesheet" href="//cdn.plyr.io/1.1.4/plyr.css"> <link rel="stylesheet" href="//cdn.plyr.io/1.1.5/plyr.css">
<!-- Docs styles --> <!-- Docs styles -->
<link rel="stylesheet" href="//cdn.plyr.io/1.1.4/docs.css"> <link rel="stylesheet" href="//cdn.plyr.io/1.1.5/docs.css">
</head> </head>
<body> <body>
<header> <header>
@ -83,13 +83,13 @@
b.insertBefore(c, b.childNodes[0]); b.insertBefore(c, b.childNodes[0]);
} }
} }
})(document, "https://cdn.plyr.io/1.1.4/sprite.svg"); })(document, "https://cdn.plyr.io/1.1.5/sprite.svg");
</script> </script>
<!-- Plyr core script --> <!-- Plyr core script -->
<script src="//cdn.plyr.io/1.1.4/plyr.js"></script> <script src="//cdn.plyr.io/1.1.5/plyr.js"></script>
<!-- Docs script --> <!-- Docs script -->
<script src="//cdn.plyr.io/1.1.4/docs.js"></script> <script src="//cdn.plyr.io/1.1.5/docs.js"></script>
</body> </body>
</html> </html>

View File

@ -1,6 +1,6 @@
{ {
"name": "plyr", "name": "plyr",
"version": "1.1.4", "version": "1.1.5",
"description": "A simple HTML5 media player using custom controls", "description": "A simple HTML5 media player using custom controls",
"homepage": "http://plyr.io", "homepage": "http://plyr.io",
"main": "gulpfile.js", "main": "gulpfile.js",

View File

@ -38,7 +38,7 @@ If you have any cool ideas or features, please let me know by [creating an issue
Check `docs/index.html` and `docs/dist/docs.js` for an example setup. Check `docs/index.html` and `docs/dist/docs.js` for an example setup.
**Heads up**, the example `index.html` file needs to be served from a webserver (such as Apache, Nginx, IIS or similar) unless you change the file sources to include http or https. e.g. change `//cdn.plyr.io/1.1.4/plyr.js` to `https://cdn.plyr.io/1.1.4/plyr.js` **Heads up**, the example `index.html` file needs to be served from a webserver (such as Apache, Nginx, IIS or similar) unless you change the file sources to include http or https. e.g. change `//cdn.plyr.io/1.1.5/plyr.js` to `https://cdn.plyr.io/1.1.5/plyr.js`
### Bower ### Bower
If bower is your thang, you can grab Plyr using: If bower is your thang, you can grab Plyr using:
@ -58,11 +58,11 @@ More info is on [npm](https://www.npmjs.com/package/ember-cli-plyr) and [GitHub]
If you want to use our CDN, you can use the following. HTTPS (SSL) is supported. If you want to use our CDN, you can use the following. HTTPS (SSL) is supported.
```html ```html
<link rel="stylesheet" href="//cdn.plyr.io/1.1.4/plyr.css"> <link rel="stylesheet" href="//cdn.plyr.io/1.1.5/plyr.css">
<script src="//cdn.plyr.io/1.1.4/plyr.js"></script> <script src="//cdn.plyr.io/1.1.5/plyr.js"></script>
``` ```
You can also access the `sprite.svg` file at `//cdn.plyr.io/1.1.4/sprite.svg`. You can also access the `sprite.svg` file at `//cdn.plyr.io/1.1.5/sprite.svg`.
### CSS ### CSS
If you want to use the default css, add the `plyr.css` file from /dist into your head, or even better use `plyr.less` or `plyr.sass` file included in `/src` in your build to save a request. If you want to use the default css, add the `plyr.css` file from /dist into your head, or even better use `plyr.less` or `plyr.sass` file included in `/src` in your build to save a request.

View File

@ -1,6 +1,6 @@
// ========================================================================== // ==========================================================================
// Plyr // Plyr
// plyr.js v1.1.2 // plyr.js v1.1.5
// https://github.com/selz/plyr // https://github.com/selz/plyr
// License: The MIT License (MIT) // License: The MIT License (MIT)
// ========================================================================== // ==========================================================================
@ -541,6 +541,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;
} }