Check for array for speed options (fixes #252)
This commit is contained in:
5
dist/plyr.js
vendored
5
dist/plyr.js
vendored
@ -2768,6 +2768,7 @@ var ui = {
|
||||
// Plyr controls
|
||||
// ==========================================================================
|
||||
|
||||
// Sniff out the browser
|
||||
var browser$2 = utils.getBrowser();
|
||||
|
||||
var controls = {
|
||||
@ -3438,7 +3439,7 @@ var controls = {
|
||||
var type = 'speed';
|
||||
|
||||
// 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];
|
||||
}
|
||||
|
||||
@ -7104,7 +7105,7 @@ var Plyr = function () {
|
||||
targetTime = this.duration;
|
||||
}
|
||||
|
||||
// Set with slightly reduced accuracy
|
||||
// Set
|
||||
this.media.currentTime = parseFloat(targetTime.toFixed(4));
|
||||
|
||||
// Logging
|
||||
|
Reference in New Issue
Block a user