Check for array for speed options (fixes #252)
This commit is contained in:
parent
05b8e8a6e0
commit
17041efc71
5
dist/plyr.js
vendored
5
dist/plyr.js
vendored
@ -2768,6 +2768,7 @@ var ui = {
|
|||||||
// Plyr controls
|
// Plyr controls
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
|
||||||
|
// Sniff out the browser
|
||||||
var browser$2 = utils.getBrowser();
|
var browser$2 = utils.getBrowser();
|
||||||
|
|
||||||
var controls = {
|
var controls = {
|
||||||
@ -3438,7 +3439,7 @@ var controls = {
|
|||||||
var type = 'speed';
|
var type = 'speed';
|
||||||
|
|
||||||
// Set the default speeds
|
// Set the default speeds
|
||||||
if (!utils.is.object(this.options.speed) || !Object.keys(this.options.speed).length) {
|
if (!utils.is.array(this.options.speed) || !this.options.speed.length) {
|
||||||
this.options.speed = [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2];
|
this.options.speed = [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7104,7 +7105,7 @@ var Plyr = function () {
|
|||||||
targetTime = this.duration;
|
targetTime = this.duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set with slightly reduced accuracy
|
// Set
|
||||||
this.media.currentTime = parseFloat(targetTime.toFixed(4));
|
this.media.currentTime = parseFloat(targetTime.toFixed(4));
|
||||||
|
|
||||||
// Logging
|
// Logging
|
||||||
|
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
5
dist/plyr.polyfilled.js
vendored
5
dist/plyr.polyfilled.js
vendored
@ -8666,6 +8666,7 @@ var ui = {
|
|||||||
// Plyr controls
|
// Plyr controls
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
|
||||||
|
// Sniff out the browser
|
||||||
var browser$2 = utils.getBrowser();
|
var browser$2 = utils.getBrowser();
|
||||||
|
|
||||||
var controls = {
|
var controls = {
|
||||||
@ -9336,7 +9337,7 @@ var controls = {
|
|||||||
var type = 'speed';
|
var type = 'speed';
|
||||||
|
|
||||||
// Set the default speeds
|
// Set the default speeds
|
||||||
if (!utils.is.object(this.options.speed) || !Object.keys(this.options.speed).length) {
|
if (!utils.is.array(this.options.speed) || !this.options.speed.length) {
|
||||||
this.options.speed = [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2];
|
this.options.speed = [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -13002,7 +13003,7 @@ var Plyr$1 = function () {
|
|||||||
targetTime = this.duration;
|
targetTime = this.duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set with slightly reduced accuracy
|
// Set
|
||||||
this.media.currentTime = parseFloat(targetTime.toFixed(4));
|
this.media.currentTime = parseFloat(targetTime.toFixed(4));
|
||||||
|
|
||||||
// Logging
|
// Logging
|
||||||
|
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
2
src/js/controls.js
vendored
2
src/js/controls.js
vendored
@ -708,7 +708,7 @@ const controls = {
|
|||||||
const type = 'speed';
|
const type = 'speed';
|
||||||
|
|
||||||
// Set the default speeds
|
// Set the default speeds
|
||||||
if (!utils.is.object(this.options.speed) || !Object.keys(this.options.speed).length) {
|
if (!utils.is.array(this.options.speed) || !this.options.speed.length) {
|
||||||
this.options.speed = [
|
this.options.speed = [
|
||||||
0.5,
|
0.5,
|
||||||
0.75,
|
0.75,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user