mirror of
https://github.com/SoPat712/videospeed.git
synced 2025-08-21 18:08:46 -04:00
Merge pull request #5 from jordn/master
Limit minimum speed to 0.00 and reduce the '10s rewind' to only slow the video down 0.10
This commit is contained in:
@@ -17,7 +17,7 @@ HTML5 video provides a native API to accelerate playback of any video. The probl
|
||||
|
||||
Once the extension is installed simply navigate to any page that offers HTML5 video ([example](http://www.youtube.com/watch?v=E9FxNzv1Tr8)), and you'll see a speed indicator in top left corner. Hover over the indicator to reveal the controls to accelerate, slowdown, or rewind the video (10 seconds + lowers playback speed). Or, even better, simply use your keyboard:
|
||||
|
||||
* **a** - will rewind video 10s and lower playback speed.
|
||||
* **a** - will rewind video 10s and lower playback speed **by 10 points**.
|
||||
* **s** - will lower playback speed.
|
||||
* **d** - will accelerate playback speed.
|
||||
|
||||
|
@@ -85,10 +85,10 @@ chrome.extension.sendMessage({}, function(response) {
|
||||
videoTags.forEach(function(v) {
|
||||
if (!v.paused && !v.classList.contains("vc-cancelled")) {
|
||||
if (action === 'rewind') {
|
||||
v.playbackRate -= 0.20;
|
||||
v.playbackRate -= 0.10;
|
||||
v.currentTime -= 10;
|
||||
} else if (action === 'faster') { v.playbackRate += 0.10 }
|
||||
else if (action === 'slower') { v.playbackRate -= 0.10 }
|
||||
else if (action === 'slower') { v.playbackRate = Math.max(v.playbackRate - 0.10, 0.00) }
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user