Merge branch 'master' of github.com:igrigorik/videospeed into apple-tv-plus

merge with master
This commit is contained in:
Jonathan Dawson
2019-11-14 16:04:07 -06:00

View File

@@ -172,6 +172,8 @@
chrome.storage.sync.set({'lastSpeed': speed}, function() {
console.log('Speed setting saved: ' + speed);
});
// show the controller for 1000ms if it's hidden.
runAction('blink', document, null, null);
}
}.bind(this));
@@ -552,6 +554,16 @@
} else if (action === 'display') {
controller.classList.add('vsc-manual');
controller.classList.toggle('vsc-hidden');
} else if (action === 'blink') {
// if vsc is hidden, show it briefly to give the use visual feedback that the action is excuted.
if(controller.classList.contains('vsc-hidden') || controller.blinkTimeOut !== undefined){
clearTimeout(controller.blinkTimeOut);
controller.classList.remove('vsc-hidden');
controller.blinkTimeOut = setTimeout(()=>{
controller.classList.add('vsc-hidden');
controller.blinkTimeOut = undefined;
}, value ? value : 1000);
}
} else if (action === 'drag') {
handleDrag(v, controller, e);
} else if (action === 'fast') {