mirror of
https://github.com/SoPat712/videospeed.git
synced 2025-11-01 10:53:48 -04:00
Don't update our video speed setting before the video is loaded.
In this state, the playback rate is always 1, as we haven't had a chance to update it yet (which currently happens in the play callback). Fixes speed setting when jumping between YouTube videos.
This commit is contained in:
@@ -44,6 +44,9 @@ chrome.extension.sendMessage({}, function(response) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
target.addEventListener('ratechange', function(event) {
|
target.addEventListener('ratechange', function(event) {
|
||||||
|
if (target.readyState === 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
var speed = this.getSpeed();
|
var speed = this.getSpeed();
|
||||||
this.speedIndicator.textContent = speed;
|
this.speedIndicator.textContent = speed;
|
||||||
tc.settings.speed = speed;
|
tc.settings.speed = speed;
|
||||||
|
|||||||
Reference in New Issue
Block a user