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

Update inject.js #173

Closed rlauuzo closed 1 month ago

jumoog commented 1 month ago

It works, but it has too many side effects. Maybe we should try to find a way to focus the button.

rlauuzo commented 1 month ago

However, this will only work on TVs now.

AbandonedCart commented 1 month ago

That should be fine. I think the issue was mainly the awkwardness of trying to use the pointer before the button faded out again. The only other platform that would really suffer from that is Android TV, but there's a good chance the average person would use an app over the browser.

jumoog commented 1 month ago

wow it works very smooth on LG

jumoog commented 1 month ago

That should be fine. I think the issue was mainly the awkwardness of trying to use the pointer before the button faded out again. The only other platform that would really suffer from that is Android TV, but there's a good chance the average person would use an app over the browser.

Yes, for the devices, I think everyone will use an app if there is one available.

jumoog commented 1 month ago

Amazon Prime Video also has no focus on the button in the browser. You have a mouse on your computer anyway. So it should work.

jumoog commented 1 month ago

I got some feedback from @Bretterteig "If the intro is at the beginning, the focus disappears from the button as soon as the OSD is faded out"

rlauuzo commented 1 month ago

Added a check for TV/browser, so skipping with Enter should work in the browser again.

rlauuzo commented 1 month ago

I got some feedback from @Bretterteig "If the intro is at the beginning, the focus disappears from the button as soon as the OSD is faded out"

Can you test if this now maintains focus without any unexpected side effects?

Bretterteig commented 1 month ago

Can you start a new build for the changes? Or can i replace the .js somewhere?

rlauuzo commented 1 month ago

https://github.com/rlauuzo/intro-skipper/releases/tag/10.9%2Fv0.2.0.6

Bretterteig commented 1 month ago

I got some feedback from @Bretterteig "If the intro is at the beginning, the focus disappears from the button as soon as the OSD is faded out"

This issue is not resolved.

Moreover, when the OSD fades (and the focus on the button is lost) pressing enter does not do anything anymore until a menu item is selected again (so neither skip nor pause)

Edit: Tested on LG webOS Edit2: Same can be seen on web

rlauuzo commented 1 month ago

Hmm... I don't have any of those issues with this version.

Bretterteig commented 1 month ago

Okay, correction on my side. On web it seems enter skips the intro but the focused status is lost (so no visual confirmation what would happen) On TV the above still stands

Edit: Note that this is only the case when the skip button appears while the osd is open and then fades

rlauuzo commented 1 month ago

ConfusedPolarBear.Plugin.IntroSkipper-v2.dll.zip Could you test this? This time, focus should work. However, the issue with not pausing when nothing is selected while the skip button is visible remains.

rlauuzo commented 1 month ago

ConfusedPolarBear.Plugin.IntroSkipper-v4.zip

Or this might fix the pausing issue.

Bretterteig commented 1 month ago

ConfusedPolarBear.Plugin.IntroSkipper-v4.zip

Or this might fix the pausing issue.

Works on TV but on Web I get this:

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'blur')
    at introSkipper.injectButton (configurationpage?name=skip-intro-button.js:150:37)

originates form here: const originalBlur = embyButton.blur;

rlauuzo commented 1 month ago

ConfusedPolarBear.Plugin.IntroSkipper-v6.dll.zip

Does this work for you?

Bretterteig commented 1 month ago

Button is back on web. Skip works for both TV and web. Two things I found:

rlauuzo commented 1 month ago

On web the button does not have the focused visual

This is intentional since there doesn't appear to be true "focus" on desktop browsers, only hover effects.