Skip to content

Commit ffc6a16

Browse files
Update player.js
1 parent 580e6d5 commit ffc6a16

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

  • js&css/web-accessible/www.youtube.com

‎js&css/web-accessible/www.youtube.com/player.js‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4146,13 +4146,11 @@ SMART SPEED ENGINE
41464146

41474147
_setRate(rate) {
41484148
const v = this._getVideo();
4149-
const clampedRate = toNum(rate, 1, 0.0625, 16);
4150-
if (!v || Math.abs(v.playbackRate - clampedRate) < 0.01) return;
4151-
this.expectedRate = clampedRate;
4152-
v.playbackRate = clampedRate;
4153-
},
4149+
if (!v || Math.abs(v.playbackRate - rate) < 0.01) return;
4150+
this.expectedRate = v.playbackRate = toNum(rate, 1, 0.0625, 16); // Clamped to Chromium's limit. Smart Speed could also do nothing, if a user momentarily sets a certain speed and one too hard to listen to.
4151+
},
41544152

4155-
_setState(next) {
4153+
_setState(next) {
41564154
this.state = next;
41574155
UI.onStateChanged(this, next);
41584156
},

0 commit comments

Comments
 (0)