mirror of
https://github.com/SoPat712/videospeed.git
synced 2025-10-30 02:30:35 -04:00
added functionality to allow user to save Video Speed in Chrome Sync Storage via Chrome Extensions's Browser Action and automated the process to apply user saved Video Speed to HTML5 videos
This commit is contained in:
@@ -12,6 +12,14 @@ chrome.extension.sendMessage({}, function(response) {
|
||||
this.video.addEventListener('ratechange', function(event) {
|
||||
this.speedIndicator.textContent = this.getSpeed();
|
||||
}.bind(this));
|
||||
chrome.storage.sync.get('speed', function(storage) {
|
||||
target.playbackRate = storage.speed;
|
||||
});
|
||||
chrome.storage.onChanged.addListener(function(storage) {
|
||||
if(storage.speed) {
|
||||
target.playbackRate = storage.speed.newValue;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
tc.videoController.prototype.getSpeed = function() {
|
||||
|
||||
Reference in New Issue
Block a user