globalSpeed icon indicating copy to clipboard operation
globalSpeed copied to clipboard

Speed settings no longer take effect after page refresh

Open hanyifansuda opened this issue 1 year ago • 4 comments

As shown in the figure, I added the url rule in the settings, added the domain name of the audio website, and set the speed modification. This webpage has an automatic rotation setting, which means that after one episode is played, it will automatically jump to the page of the next episode to continue playing. For example, from book.com/book1_001.html to book.com/book1_002.html.However, after the jump, the speed setting is invalid, and the default one-speed playback is used. The variable speed setting doesn't take effect unless I go back to the audio page.How can I set it up so that I don't need to do any click operations on the page after the jump, so that it can always play at the set speed. Of course, I don't want to affect the video or audio of other pages.

123

hanyifansuda avatar Sep 21 '22 01:09 hanyifansuda

Hello. I will try to fix this issue for the next update. For now, you can create a second URL rule that runs this javascript code. After 2 seconds it will change speed to 1.35. Don't delete the first URL rule that sets speed to 1.35, you will need both. Let me know if it doesn't work.

setTimeout(() => {
    document.querySelectorAll("video").forEach(v => {
        v.playbackRate = 1.35 
    })
}, 2000)

polywock avatar Sep 21 '22 03:09 polywock

Thanks for your answer! However, as you said, i create two URL rules as shown in figures, but it still doesn't work.

1234

hanyifansuda avatar Sep 21 '22 04:09 hanyifansuda

Hello. Can you try this one as well? It also selects audio elements.

setTimeout(() => {
    document.querySelectorAll("video, audio").forEach(v => {
        v.playbackRate = 1.35 
    })
}, 2000)

polywock avatar Sep 21 '22 17:09 polywock

Sorry, the script still doesn't work according to your instructions. I suspect that when the webpage is automatically refreshed in the background, the script doesn't work anymore.

hanyifansuda avatar Sep 22 '22 00:09 hanyifansuda