-
Notifications
You must be signed in to change notification settings - Fork 845
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
[Bug]: SponsorBlock segments don't always display in the timeline when using the Invidious API #2492
Comments
Did u also had issue with the local api like in #1439 |
I am unsure. It is totally possible. It is very likely that it is less pronounced for the Local API because it is taking less time with each request. |
the seconds length value provided by the API rather than trying to pull the time from the video element. This is related to FreeTubeApp#2492 and #9.
Is it possible for u to look into. If u want and have the time for it? |
I believe my pull request will fix this issue. I do not know for sure if it will fix the other issue, but it might from the looks of it. |
the seconds length value provided by the API rather than trying to pull the time from the video element. This is related to #2492 and MarmadileManteater#9.
Guidelines
Describe the bug
Expected Behavior
The sponsored segments should display on the timeline in the color selected in the settings. This is what the video looks like when the local API is selected.
Issue Labels
race condition
FreeTube Version
v0.17.1
Operating System Version
Windows 10 Pro Version 21H2 Installed on 4/3/2022 OS build 19044.1889 Experience Windows Feature Experience Pack 120.2212.4180.0
Installation Method
.exe
Primary API used
Invidious API
Last Known Working FreeTube Version (If Any)
No response
Additional Information
This issue seems to be occurring because
this.player.duration()
is often 0 at the time whenaddSponsorBlockMarker
is called (especially when the Invidious API is preferred), andthis.player.duration()
only becomes the length of the video afteraddSponsorBlockMarker
is called. This causes a division by zero where the width and positioning of the sponsored segments would normally be set.JavaScript evaulates the strings as
Infinity%
, and the result is that the sponsored segments do not always appear when the Invidious API is selected as the preferred API.Nightly Build
The text was updated successfully, but these errors were encountered: