jumoog / intro-skipper

Fingerprint audio to automatically detect and skip intro/credit sequences in Jellyfin
https://discord.gg/AYZ7RJ3BuA
GNU General Public License v3.0
405 stars 22 forks source link

allow the intro skip button to be confirmed with the Enter key #170

Closed jumoog closed 1 month ago

jumoog commented 1 month ago

tested with LG webOS

jumoog commented 1 month ago

the PR for #149

AbandonedCart commented 1 month ago

Ironically setTimeout is one of the functions that the security stuff complains about. If you add an event handler in javascript and one already exists, does it append? In java it does, but it's been a while since I had to think about "what if someone else is using enter"

AbandonedCart commented 1 month ago

It's probably irrelevant, but I typically target keyup because that implies it was pressed and released. Keeps it from triggering until the cat steps off the keyboard.

jumoog commented 1 month ago

It's irrelevant because I set usecapture true for addEventListener. The keyup event is still handled by jellyfin. (display the video OSD) The Enter key works normally all the time. If the intro button is visible, the intro will be skipped instead of pausing the video and the Enter key will not work for the next 5 seconds.

And setTimeout is used alot in jellyfin-web

AbandonedCart commented 1 month ago

And setTimeout is used alot in jellyfin-web

The function itself is harmless. What triggers the flags is how, when, and who ran it. It's not like it really matters, given the way plugins work in general.

rlauuzo commented 1 month ago

works 👍

jumoog commented 1 month ago

It was so close to being impossible to do 😂