Use Shaka chapter tracks for seek bar chapter preview#9092
Closed
aditya0155 wants to merge 3 commits into
Closed
Conversation
Contributor
Author
|
Here's a video showing the blurry seek bar when using Shaka's native chapter marker gradient and why I still kept FreeTube's existing DOM-based chapter marker overlay for the visual ticks Shaka_Blurry_seekbar.mp4and I dont think making a PR in shaka will help for this issue either because It's Chromium rendering limitation |
Replace await .catch() with try/catch for addChaptersTrack for consistency with other error handling patterns in the file. Add !isLive.value guard to the visual chapter markers call in handleLoaded() for symmetry with the VTT chapter track guard.
auto-merge was automatically disabled
May 2, 2026 15:39
Head branch was pushed to by a user without write access
Member
|
Closing in favour of the more complete #9134 (I started work on it before this pull request, so it seemed better to finish mine than ask you to rewrite yours from scratch). |
auto-merge was automatically disabled
May 13, 2026 20:51
Pull request was closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Type
Related issue
Description
Continuation of PR #8312.
This PR adds chapter names to Shaka's seek bar preview when hovering over the timeline.
FreeTube already extracts video chapters from YouTube and passes them into the player component. Previously (in #8312), those chapters were used by FreeTube itself, and the player wrapper manually added small chapter marker elements into Shaka's seek bar.
That worked for showing the visual chapter markers, but it did not let Shaka show the current chapter name in the hover preview which made it very fragile.
Since shaka-project/shaka-player#9413 is already implemented, this PR now uses Shaka's native chapter track support for the preview text. FreeTube takes its existing chapter data, converts it into a
WebVTTformat, and adds it to Shaka withplayer.addChaptersTrack(...)after the player loads.After Shaka gets the chapter track, it can display the right chapter name in the seek preview.
But there's still one thing FreeTube handles on purpose, the small chapter marker ticks on the seek bar. Shaka’s built-in chapter markers use a CSS gradient, which ends up making the seek bar look kind of blurry when chapters are shown. To keep those markers nice and sharp, this PR turns off Shaka’s gradient for chapter markers and sticks with FreeTube’s current DOM-based overlay for the ticks.
Screenshots
Before:
BEFORE.mp4
After:
When hovering over the seek bar on a video with chapters, the preview shows the timestamp and chapter title.
After.2.1.mp4
Test on simple video (after)
Test.Simple.Video.After.mp4
Testing
Desktop
Additional context
The upstream Shaka Player support for showing chapter names in the seek bar preview was added in shaka-project/shaka-player#9413. FreeTube is already using
shaka-player5.1.2, which includes that upstream behavior.The new flow is: