-
-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add sponsorblock support for videos with chapters #103
Conversation
Sweet. I will (try to) look through and merge all these pending changes
~next weekend when I have access to my testing machines again.
Thanks for contributing.
…On Wed, 1 Nov 2023, 23:20 Ali Yousuf, ***@***.***> wrote:
Here is my attempt to add feature to support SponsorBlock on videos with
Chapters.
I was able to iron out issues that #9
<#9> faced w.r.t infinite
loop - i resolved by mounting segment overlay on parent node
I tested it locally on my computer (by mocking User-Agent + TamperMoney to
inject the userscript)
*I installed webpack-dev-server locally to prevent rebuilding manually on
every change*
[image: image]
<https://user-images.githubusercontent.com/14050128/279823182-0f181d65-a427-4b97-befd-7a1d25d748bf.png> Known
Issue
The SponsorBlock segments do not change height when user is seeking the
progress bar - it stays the same height. This is because we currently do
not detect which chapter the video is at.
[image: image]
<https://user-images.githubusercontent.com/14050128/279823252-7e77790e-4c79-4b25-82e2-0d04390b6d66.png>
------------------------------
You can view, comment on, or merge this pull request online at:
#103
Commit Summary
- efda30b
<efda30b>
add chapter sponsorblock support
File Changes
(1 file <https://github.com/webosbrew/youtube-webos/pull/103/files>)
- *M* src/sponsorblock.js
<https://github.com/webosbrew/youtube-webos/pull/103/files#diff-011d5979f636b439958b5e3e9fbf0be313723e4a4ae82b256c764a101e5784a1>
(123)
Patch Links:
- https://github.com/webosbrew/youtube-webos/pull/103.patch
- https://github.com/webosbrew/youtube-webos/pull/103.diff
—
Reply to this email directly, view it on GitHub
<#103>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIUEXVCH2XNH4FK6DYSYEDYCLKLXAVCNFSM6AAAAAA62ASJ3GVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE3TGMRUGY4TKMY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
@Informatic did you get a change to look at it? |
@Informatic @throwaway96 I've tested this on an LG OLED C9 (webOS 4.9.7) and it works fine. Would be great if it could be merged. |
Anyone know of a good video to test this on? |
May be try any of Linus Tech Tip videos? Their videos have pretty well defined chapters and full of sponsors. One sample video from their channel: https://www.youtube.com/watch?v=i9TJWsuzBLU&ab_channel=LinusTechTips |
It does appear to work. Changes to the SponsorBlock settings don't seem to take effect on the current video, but that has always been the case, right? |
Do you mean toggling off SponsorBlock to show/hide the relevant timestamps and/or changing the different categories? |
I just got a chance to take a closer look at this after noticing a lot of log activity. Can you please explain why you changed the interval for starting the It would be nice to get rid of the |
It's been a while I wrote this - IIRC, YouTube renders a slider without chapters first, only after a while it finishes loading the data for chapters, it unmounts the non-chapter slider (progress-bar) and renders another slider (multi-markers-player-bar) with chapters after a while. So when the slider gets unmounted, it tries to look for a slider, so that we can place our segment overlay on top of it. I'll take a second look at it and see if we can get rid of the setTimeout. |
Is it supposed to be running continuously during playback though? I didn't look into it that deeply, but I'm pretty sure I was seeing messages logged every 100ms throughout most of the time a video was playing. |
It isn't supposed to run during playback. |
It seems like this may be causing issues on some videos (#148). Any ideas on what could be causing this? I don't really have time to look into it at the moment. I want to do a release soon—as in today or tomorrow—with the other recent fixes, so I may (temporarily) revert this. |
Seems like this wasn't the cause of #148. I had assumed it was since it was pretty much the only thing to touch SponsorBlock, but this issue already existed. So I'll leave this in for the release candidate. |
Here is my attempt to add feature to support SponsorBlock on videos with Chapters.
I was able to iron out issues that #9 faced w.r.t infinite loop - i resolved by mounting segment overlay on parent node
I tested it locally on my computer (by mocking User-Agent + TamperMoney to inject the userscript), as well as on my LG webOS TV
I installed
webpack-dev-server
locally to avoid rebuilding manually on every changeKnown Issue
The SponsorBlock segments do not change height when user is seeking the progress bar - it stays the same height. This is because we currently do not detect which chapter the video is at.