General theme: add license and add URL source code in footer
This commit is contained in:
13
youtube/static/js/speedyplay.js
Normal file
13
youtube/static/js/speedyplay.js
Normal file
@@ -0,0 +1,13 @@
|
||||
(function main() {
|
||||
'use strict';
|
||||
const video = document.getElementById('js-video-player');
|
||||
const speedInput = document.getElementById('speed-control');
|
||||
speedInput.addEventListener('keyup', (event) => {
|
||||
if (event.key === 'Enter') {
|
||||
let speed = parseFloat(speedInput.value);
|
||||
if(!isNaN(speed)){
|
||||
video.playbackRate = speed;
|
||||
}
|
||||
}
|
||||
});
|
||||
}());
|
||||
Reference in New Issue
Block a user