mirror of
https://github.com/SoPat712/videospeed.git
synced 2025-08-22 02:18:45 -04:00
update min/max references, closes #409
This commit is contained in:
@@ -407,12 +407,12 @@
|
||||
v.currentTime += value;
|
||||
} else if (action === 'faster') {
|
||||
// Maximum playback speed in Chrome is set to 16:
|
||||
// https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/html/media/HTMLMediaElement.cpp?l=168
|
||||
// https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/html/media/html_media_element.cc?gsn=kMinRate&l=166
|
||||
var s = Math.min((v.playbackRate < 0.1 ? 0.0 : v.playbackRate) + value, 16);
|
||||
v.playbackRate = Number(s.toFixed(2));
|
||||
} else if (action === 'slower') {
|
||||
// Video min rate is 0.0625:
|
||||
// https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/html/media/HTMLMediaElement.cpp?l=167
|
||||
// https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/html/media/html_media_element.cc?gsn=kMinRate&l=165
|
||||
var s = Math.max(v.playbackRate - value, 0.07);
|
||||
v.playbackRate = Number(s.toFixed(2));
|
||||
} else if (action === 'reset') {
|
||||
|
Reference in New Issue
Block a user