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:
George Ogata
2015-05-31 03:54:57 -04:00
parent 7031049819
commit e75f4f0c60

View File

@@ -44,6 +44,9 @@ chrome.extension.sendMessage({}, function(response) {
});
target.addEventListener('ratechange', function(event) {
if (target.readyState === 0) {
return;
}
var speed = this.getSpeed();
this.speedIndicator.textContent = speed;
tc.settings.speed = speed;