v3.3.9
This commit is contained in:
parent
e9684c2021
commit
69bb0917ad
12
changelog.md
12
changelog.md
@ -1,8 +1,18 @@
|
|||||||
|
# v3.3.9
|
||||||
|
|
||||||
|
Again, more changes from @friday!
|
||||||
|
|
||||||
|
* Restore window reference in `utils.is.cue()`
|
||||||
|
* Fix InvalidStateError and IE11 issues
|
||||||
|
* Respect storage being disabled for storage getter
|
||||||
|
|
||||||
# v3.3.8
|
# v3.3.8
|
||||||
|
|
||||||
|
Many changes here thanks to @friday:
|
||||||
|
|
||||||
* Added missing URL polyfill
|
* Added missing URL polyfill
|
||||||
* Pause while seeking to mimic default HTML5 behaviour
|
* Pause while seeking to mimic default HTML5 behaviour
|
||||||
* Add 'seeked' event listener to update progress (fixes #966)
|
* Add `seeked` event listener to update progress (fixes #966)
|
||||||
* Trigger seeked event in youtube plugin if either playing or paused (fixes #921)
|
* Trigger seeked event in youtube plugin if either playing or paused (fixes #921)
|
||||||
* Fix for YouTube and Vimeo autoplays on seek (fixes #876)
|
* Fix for YouTube and Vimeo autoplays on seek (fixes #876)
|
||||||
* Toggle controls improvements
|
* Toggle controls improvements
|
||||||
|
31
dist/plyr.js
vendored
31
dist/plyr.js
vendored
@ -407,7 +407,7 @@ var Storage = function () {
|
|||||||
createClass(Storage, [{
|
createClass(Storage, [{
|
||||||
key: 'get',
|
key: 'get',
|
||||||
value: function get$$1(key) {
|
value: function get$$1(key) {
|
||||||
if (!Storage.supported) {
|
if (!Storage.supported || !this.enabled) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -526,7 +526,7 @@ var utils = {
|
|||||||
return this.instanceof(input, Event);
|
return this.instanceof(input, Event);
|
||||||
},
|
},
|
||||||
cue: function cue(input) {
|
cue: function cue(input) {
|
||||||
return this.instanceof(input, TextTrackCue) || this.instanceof(input, VTTCue);
|
return this.instanceof(input, window.TextTrackCue) || this.instanceof(input, window.VTTCue);
|
||||||
},
|
},
|
||||||
track: function track(input) {
|
track: function track(input) {
|
||||||
return this.instanceof(input, TextTrack) || !this.nullOrUndefined(input) && this.string(input.kind);
|
return this.instanceof(input, TextTrack) || !this.nullOrUndefined(input) && this.string(input.kind);
|
||||||
@ -3628,7 +3628,7 @@ var defaults$1 = {
|
|||||||
// Sprite (for icons)
|
// Sprite (for icons)
|
||||||
loadSprite: true,
|
loadSprite: true,
|
||||||
iconPrefix: 'plyr',
|
iconPrefix: 'plyr',
|
||||||
iconUrl: 'https://cdn.plyr.io/3.3.8/plyr.svg',
|
iconUrl: 'https://cdn.plyr.io/3.3.9/plyr.svg',
|
||||||
|
|
||||||
// Blank video (used to prevent errors on source change)
|
// Blank video (used to prevent errors on source change)
|
||||||
blankVideo: 'https://cdn.plyr.io/static/blank.mp4',
|
blankVideo: 'https://cdn.plyr.io/static/blank.mp4',
|
||||||
@ -7599,21 +7599,16 @@ var Plyr = function () {
|
|||||||
}, {
|
}, {
|
||||||
key: 'currentTime',
|
key: 'currentTime',
|
||||||
set: function set$$1(input) {
|
set: function set$$1(input) {
|
||||||
var targetTime = 0;
|
// Bail if media duration isn't available yet
|
||||||
|
if (!this.duration) {
|
||||||
if (utils.is.number(input)) {
|
return;
|
||||||
targetTime = input;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Normalise targetTime
|
// Validate input
|
||||||
if (targetTime < 0) {
|
var inputIsValid = utils.is.number(input) && input > 0;
|
||||||
targetTime = 0;
|
|
||||||
} else if (targetTime > this.duration) {
|
|
||||||
targetTime = this.duration;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set
|
// Set
|
||||||
this.media.currentTime = targetTime;
|
this.media.currentTime = inputIsValid ? Math.min(input, this.duration) : 0;
|
||||||
|
|
||||||
// Logging
|
// Logging
|
||||||
this.debug.log('Seeking to ' + this.currentTime + ' seconds');
|
this.debug.log('Seeking to ' + this.currentTime + ' seconds');
|
||||||
@ -7672,11 +7667,11 @@ var Plyr = function () {
|
|||||||
// Faux duration set via config
|
// Faux duration set via config
|
||||||
var fauxDuration = parseFloat(this.config.duration);
|
var fauxDuration = parseFloat(this.config.duration);
|
||||||
|
|
||||||
// True duration
|
// Media duration can be NaN before the media has loaded
|
||||||
var realDuration = this.media ? Number(this.media.duration) : 0;
|
var duration = (this.media || {}).duration || 0;
|
||||||
|
|
||||||
// If custom duration is funky, use regular duration
|
// If config duration is funky, use regular duration
|
||||||
return !Number.isNaN(fauxDuration) ? fauxDuration : realDuration;
|
return fauxDuration || duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
2
dist/plyr.js.map
vendored
2
dist/plyr.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/plyr.min.js
vendored
2
dist/plyr.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/plyr.min.js.map
vendored
2
dist/plyr.min.js.map
vendored
File diff suppressed because one or more lines are too long
31
dist/plyr.polyfilled.js
vendored
31
dist/plyr.polyfilled.js
vendored
@ -5813,7 +5813,7 @@ var Storage = function () {
|
|||||||
createClass(Storage, [{
|
createClass(Storage, [{
|
||||||
key: 'get',
|
key: 'get',
|
||||||
value: function get(key) {
|
value: function get(key) {
|
||||||
if (!Storage.supported) {
|
if (!Storage.supported || !this.enabled) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5932,7 +5932,7 @@ var utils = {
|
|||||||
return this.instanceof(input, Event);
|
return this.instanceof(input, Event);
|
||||||
},
|
},
|
||||||
cue: function cue(input) {
|
cue: function cue(input) {
|
||||||
return this.instanceof(input, TextTrackCue) || this.instanceof(input, VTTCue);
|
return this.instanceof(input, window.TextTrackCue) || this.instanceof(input, window.VTTCue);
|
||||||
},
|
},
|
||||||
track: function track(input) {
|
track: function track(input) {
|
||||||
return this.instanceof(input, TextTrack) || !this.nullOrUndefined(input) && this.string(input.kind);
|
return this.instanceof(input, TextTrack) || !this.nullOrUndefined(input) && this.string(input.kind);
|
||||||
@ -9034,7 +9034,7 @@ var defaults$1 = {
|
|||||||
// Sprite (for icons)
|
// Sprite (for icons)
|
||||||
loadSprite: true,
|
loadSprite: true,
|
||||||
iconPrefix: 'plyr',
|
iconPrefix: 'plyr',
|
||||||
iconUrl: 'https://cdn.plyr.io/3.3.8/plyr.svg',
|
iconUrl: 'https://cdn.plyr.io/3.3.9/plyr.svg',
|
||||||
|
|
||||||
// Blank video (used to prevent errors on source change)
|
// Blank video (used to prevent errors on source change)
|
||||||
blankVideo: 'https://cdn.plyr.io/static/blank.mp4',
|
blankVideo: 'https://cdn.plyr.io/static/blank.mp4',
|
||||||
@ -13005,21 +13005,16 @@ var Plyr = function () {
|
|||||||
}, {
|
}, {
|
||||||
key: 'currentTime',
|
key: 'currentTime',
|
||||||
set: function set(input) {
|
set: function set(input) {
|
||||||
var targetTime = 0;
|
// Bail if media duration isn't available yet
|
||||||
|
if (!this.duration) {
|
||||||
if (utils.is.number(input)) {
|
return;
|
||||||
targetTime = input;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Normalise targetTime
|
// Validate input
|
||||||
if (targetTime < 0) {
|
var inputIsValid = utils.is.number(input) && input > 0;
|
||||||
targetTime = 0;
|
|
||||||
} else if (targetTime > this.duration) {
|
|
||||||
targetTime = this.duration;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set
|
// Set
|
||||||
this.media.currentTime = targetTime;
|
this.media.currentTime = inputIsValid ? Math.min(input, this.duration) : 0;
|
||||||
|
|
||||||
// Logging
|
// Logging
|
||||||
this.debug.log('Seeking to ' + this.currentTime + ' seconds');
|
this.debug.log('Seeking to ' + this.currentTime + ' seconds');
|
||||||
@ -13078,11 +13073,11 @@ var Plyr = function () {
|
|||||||
// Faux duration set via config
|
// Faux duration set via config
|
||||||
var fauxDuration = parseFloat(this.config.duration);
|
var fauxDuration = parseFloat(this.config.duration);
|
||||||
|
|
||||||
// True duration
|
// Media duration can be NaN before the media has loaded
|
||||||
var realDuration = this.media ? Number(this.media.duration) : 0;
|
var duration = (this.media || {}).duration || 0;
|
||||||
|
|
||||||
// If custom duration is funky, use regular duration
|
// If config duration is funky, use regular duration
|
||||||
return !Number.isNaN(fauxDuration) ? fauxDuration : realDuration;
|
return fauxDuration || duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
2
dist/plyr.polyfilled.js.map
vendored
2
dist/plyr.polyfilled.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/plyr.polyfilled.min.js
vendored
2
dist/plyr.polyfilled.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/plyr.polyfilled.min.js.map
vendored
2
dist/plyr.polyfilled.min.js.map
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "plyr",
|
"name": "plyr",
|
||||||
"version": "3.3.8",
|
"version": "3.3.9",
|
||||||
"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": "https://plyr.io",
|
"homepage": "https://plyr.io",
|
||||||
"main": "./dist/plyr.js",
|
"main": "./dist/plyr.js",
|
||||||
|
@ -128,13 +128,13 @@ See [initialising](#initialising) for more information on advanced setups.
|
|||||||
You can use our CDN (provided by [Fastly](https://www.fastly.com/)) for the JavaScript. There's 2 versions; one with and one without [polyfills](#polyfills). My recommendation would be to manage polyfills seperately as part of your application but to make life easier you can use the polyfilled build.
|
You can use our CDN (provided by [Fastly](https://www.fastly.com/)) for the JavaScript. There's 2 versions; one with and one without [polyfills](#polyfills). My recommendation would be to manage polyfills seperately as part of your application but to make life easier you can use the polyfilled build.
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="https://cdn.plyr.io/3.3.8/plyr.js"></script>
|
<script src="https://cdn.plyr.io/3.3.9/plyr.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
...or...
|
...or...
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="https://cdn.plyr.io/3.3.8/plyr.polyfilled.js"></script>
|
<script src="https://cdn.plyr.io/3.3.9/plyr.polyfilled.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
### CSS
|
### CSS
|
||||||
@ -148,13 +148,13 @@ 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/3.3.8/plyr.css">
|
<link rel="stylesheet" href="https://cdn.plyr.io/3.3.9/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
|
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/3.3.8/plyr.svg`.
|
reference, the CDN hosted SVG sprite can be found at `https://cdn.plyr.io/3.3.9/plyr.svg`.
|
||||||
|
|
||||||
## Ads
|
## Ads
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ const defaults = {
|
|||||||
// Sprite (for icons)
|
// Sprite (for icons)
|
||||||
loadSprite: true,
|
loadSprite: true,
|
||||||
iconPrefix: 'plyr',
|
iconPrefix: 'plyr',
|
||||||
iconUrl: 'https://cdn.plyr.io/3.3.8/plyr.svg',
|
iconUrl: 'https://cdn.plyr.io/3.3.9/plyr.svg',
|
||||||
|
|
||||||
// Blank video (used to prevent errors on source change)
|
// Blank video (used to prevent errors on source change)
|
||||||
blankVideo: 'https://cdn.plyr.io/static/blank.mp4',
|
blankVideo: 'https://cdn.plyr.io/static/blank.mp4',
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
// Plyr
|
// Plyr
|
||||||
// plyr.js v3.3.8
|
// plyr.js v3.3.9
|
||||||
// https://github.com/sampotts/plyr
|
// https://github.com/sampotts/plyr
|
||||||
// License: The MIT License (MIT)
|
// License: The MIT License (MIT)
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
// Plyr Polyfilled Build
|
// Plyr Polyfilled Build
|
||||||
// plyr.js v3.3.8
|
// plyr.js v3.3.9
|
||||||
// https://github.com/sampotts/plyr
|
// https://github.com/sampotts/plyr
|
||||||
// License: The MIT License (MIT)
|
// License: The MIT License (MIT)
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
Loading…
x
Reference in New Issue
Block a user