mirror of
https://github.com/SoPat712/videospeed.git
synced 2025-08-21 18:08:46 -04:00

committed by
Ilya Grigorik

parent
d8965f644c
commit
568282a106
12
inject.js
12
inject.js
@@ -483,7 +483,7 @@
|
||||
} else if (action === 'fast') {
|
||||
resetSpeed(v, value);
|
||||
} else if (action === 'pause') {
|
||||
pauseSpeed(v, value);
|
||||
pause(v);
|
||||
} else if (action === 'muted') {
|
||||
muted(v, value);
|
||||
} else if (action === 'mark') {
|
||||
@@ -495,12 +495,12 @@
|
||||
});
|
||||
}
|
||||
|
||||
function pauseSpeed(v, target) {
|
||||
// not working as expected in youtube for now
|
||||
if (v.playbackRate === target) {
|
||||
v.play()
|
||||
function pause(v) {
|
||||
if (v.paused) {
|
||||
v.play();
|
||||
} else {
|
||||
v.pause();
|
||||
}
|
||||
resetSpeed(v, target)
|
||||
}
|
||||
|
||||
function resetSpeed(v, target) {
|
||||
|
Reference in New Issue
Block a user