Fix for YouTube .getVideoData() issue (fixes #709)

This commit is contained in:
Sam Potts 2017-11-14 13:28:52 +01:00
parent 0ec0addbda
commit 9c4b53d761
6 changed files with 15 additions and 10 deletions

View File

@ -1,5 +1,8 @@
# Changelog # Changelog
## v2.0.18
- Fix for YouTube .getVideoData() issue (fixes #709)
## v2.0.17 ## v2.0.17
- Vimeo controls fix (fixes #697) - Vimeo controls fix (fixes #697)
- SVG4everybody compatibility fix - SVG4everybody compatibility fix

2
dist/plyr.js vendored

File diff suppressed because one or more lines are too long

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "plyr", "name": "plyr",
"version": "2.0.17", "version": "2.0.18",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "plyr", "name": "plyr",
"version": "2.0.17", "version": "2.0.18",
"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

@ -137,7 +137,7 @@ Include the `plyr.js` script before the closing `</body>` tag and then call `ply
If you want to use our CDN (provided by [Fastly](https://www.fastly.com/)) for the JavaScript, you can use the following: If you want to use our CDN (provided by [Fastly](https://www.fastly.com/)) for the JavaScript, you can use the following:
```html ```html
<script src="https://cdn.plyr.io/2.0.17/plyr.js"></script> <script src="https://cdn.plyr.io/2.0.18/plyr.js"></script>
``` ```
### CSS ### CSS
@ -150,11 +150,11 @@ Include the `plyr.css` stylsheet into your `<head>`
If you want to use our CDN (provided by [Fastly](https://www.fastly.com/)) for the default CSS, you can use the following: If you want to use our CDN (provided by [Fastly](https://www.fastly.com/)) for the default CSS, you can use the following:
```html ```html
<link rel="stylesheet" href="https://cdn.plyr.io/2.0.17/plyr.css"> <link rel="stylesheet" href="https://cdn.plyr.io/2.0.18/plyr.css">
``` ```
### SVG Sprite ### SVG Sprite
The SVG sprite is loaded automatically from our CDN (provided by [Fastly](https://www.fastly.com/)). 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.17/plyr.svg`. The SVG sprite is loaded automatically from our CDN (provided by [Fastly](https://www.fastly.com/)). 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.18/plyr.svg`.
## Advanced ## Advanced

View File

@ -1,6 +1,6 @@
// ========================================================================== // ==========================================================================
// Plyr // Plyr
// plyr.js v2.0.17 // plyr.js v2.0.18
// https://github.com/sampotts/plyr // https://github.com/sampotts/plyr
// License: The MIT License (MIT) // License: The MIT License (MIT)
// ========================================================================== // ==========================================================================
@ -44,7 +44,7 @@
displayDuration: true, displayDuration: true,
loadSprite: true, loadSprite: true,
iconPrefix: 'plyr', iconPrefix: 'plyr',
iconUrl: 'https://cdn.plyr.io/2.0.17/plyr.svg', iconUrl: 'https://cdn.plyr.io/2.0.18/plyr.svg',
blankUrl: 'https://cdn.plyr.io/static/blank.mp4', blankUrl: 'https://cdn.plyr.io/static/blank.mp4',
clickToPlay: true, clickToPlay: true,
hideControls: true, hideControls: true,
@ -1768,8 +1768,10 @@
plyr.media.currentTime = 0; plyr.media.currentTime = 0;
plyr.media.muted = instance.isMuted(); plyr.media.muted = instance.isMuted();
// Set title // Set title if possible
if (typeof instance.getVideoData === 'function') {
config.title = instance.getVideoData().title; config.title = instance.getVideoData().title;
}
// Set the tabindex // Set the tabindex
if (plyr.supported.full) { if (plyr.supported.full) {