diff options
author | Sam Potts <sam@potts.es> | 2020-02-10 18:35:42 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-10 18:35:42 +0000 |
commit | 841746210ac6444c2e15395e14856d0d889ffd9c (patch) | |
tree | b7a5a2b41443c0101e1a3a6cc5175cfb8229c440 /src/js/controls.js | |
parent | e50b35d195316a1aee28797de26b3d7b42daa0be (diff) | |
parent | 156abda66adeae369dce9d565e9c0ca21508e557 (diff) | |
download | plyr-841746210ac6444c2e15395e14856d0d889ffd9c.tar.lz plyr-841746210ac6444c2e15395e14856d0d889ffd9c.tar.xz plyr-841746210ac6444c2e15395e14856d0d889ffd9c.zip |
Merge pull request #1684 from sampotts/develop
v3.5.8
Diffstat (limited to 'src/js/controls.js')
-rw-r--r-- | src/js/controls.js | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/js/controls.js b/src/js/controls.js index 1cce51f6..66ec7139 100644 --- a/src/js/controls.js +++ b/src/js/controls.js @@ -9,7 +9,7 @@ import captions from './captions'; import html5 from './html5'; import support from './support'; import { repaint, transitionEndEvent } from './utils/animation'; -import { dedupe, fillRange } from './utils/arrays'; +import { dedupe } from './utils/arrays'; import browser from './utils/browser'; import { createElement, @@ -1053,13 +1053,8 @@ const controls = { const type = 'speed'; const list = this.elements.settings.panels.speed.querySelector('[role="menu"]'); - // Determine options to display - // Vimeo and YouTube limit to 0.5x-2x - if (this.isVimeo || this.isYouTube) { - this.options.speed = fillRange(0.5, 2, 0.25).filter(s => this.config.speed.options.includes(s)); - } else { - this.options.speed = this.config.speed.options; - } + // Filter out invalid speeds + this.options.speed = this.options.speed.filter(o => o >= this.minimumSpeed && o <= this.maximumSpeed); // Toggle the pane and tab const toggle = !is.empty(this.options.speed) && this.options.speed.length > 1; |