Repository navigation
Add chapter markers and chapter title display - #208
Merged
Merged
Conversation
Co-Authored-By: ceyhun.ozgoc <ceyhun.ozgoc@dolby.com>
Co-Authored-By: ceyhun.ozgoc <ceyhun.ozgoc@dolby.com>
Co-Authored-By: ceyhun.ozgoc <ceyhun.ozgoc@dolby.com>
Co-Authored-By: ceyhun.ozgoc <ceyhun.ozgoc@dolby.com>
Co-Authored-By: ceyhun.ozgoc <ceyhun.ozgoc@dolby.com>
Co-Authored-By: ceyhun.ozgoc <ceyhun.ozgoc@dolby.com>
Co-Authored-By: ceyhun.ozgoc <ceyhun.ozgoc@dolby.com>
Co-Authored-By: ceyhun.ozgoc <ceyhun.ozgoc@dolby.com>
Co-Authored-By: ceyhun.ozgoc <ceyhun.ozgoc@dolby.com>
Co-Authored-By: ceyhun.ozgoc <ceyhun.ozgoc@dolby.com>
Co-Authored-By: ceyhun.ozgoc <ceyhun.ozgoc@dolby.com>
Co-Authored-By: ceyhun.ozgoc <ceyhun.ozgoc@dolby.com>
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
🦋 Changeset detectedLatest commit: ba5dc4c The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Co-Authored-By: ceyhun.ozgoc <ceyhun.ozgoc@dolby.com>
Co-Authored-By: ceyhun.ozgoc <ceyhun.ozgoc@dolby.com>
Co-Authored-By: ceyhun.ozgoc <ceyhun.ozgoc@dolby.com>
Co-Authored-By: ceyhun.ozgoc <ceyhun.ozgoc@dolby.com>
ceyhun-o
marked this pull request as ready for review
October 13, 2026 08:52
MattiasBuelens
approved these changes
Oct 13, 2026
Merged
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.
Summary
Adds chapter support to the seek bar and the default UI.
<theoplayer-time-range show-chapter-markers>renders a<theoplayer-time-range-chapter-markers part="chapters">. It draws one segment per cue of the first chapters text track that hasmode === 'showing', loaded cues and no load error. Segments exposepart="chapter"plus theactive,hoveranddiscontinuoustokens, and these are forwarded withexportpartssotheoplayer-time-range::part(chapter)still works. Markers are hidden while a linear ad plays.ResizeObserveris needed. Inner boundaries use the thumb mapping,calc(var(--theoplayer-range-thumb-width) / 2 + fraction * (100% - var(--theoplayer-range-thumb-width))), so the thumb lands exactly on a chapter start. The first and last visible segments are flush with the edges of the bar.TimeRangeonly passesplayer,min,maxandhoverTime. The markers component watches the chapter track itself.aria-valuetextgets the chapter title appended, through the newtimeRangeChapterAriaValueTextlocale entry.<theoplayer-chapter-display>shows the chapter title at the preview time while hovering or dragging the seek bar, and otherwise at the current time. It is hidden when there is no title. Its size can be set with--theoplayer-chapter-display-font-size(default16px).previewActivestate, sent withtheoplayerpreviewactivechangeand forwarded byUIContainerto state receivers. It is needed becausepreviewTimekeeps its last value after the pointer leaves the seek bar.<theoplayer-default-ui>turns onshow-chapter-markersand shows the chapter display in its own row above the seek bar.ChapterDisplayandTimeRangeChapterMarkerswrappers. Also: a "Sintel with chapters" example source and docs.Teardown fix
Removing a
<theoplayer-ui>or<theoplayer-default-ui>(or unmounting it in React) threwTypeErrors from components that readplayer.textTracks,audioTracksorvideoTrackson a player thatUIContainer.disconnectedCallbackhad already destroyed. This also affected the existing audio and quality menus. Now:TimeRangealso passes the player to its chapter markers synchronously in itsplayersetter, through a ref, instead of waiting for the next render, so the markers detach before the player is destroyed. This has its own patch changeset.Testing
Verified manually with real playback of the Sintel HLS stream and its side-loaded WebVTT chapters:
aria-valuetext.DefaultUIand a customUIContainerwithTimeRange showChapterMarkers+ChapterDisplay, including hover.DefaultUIthrew 6 uncaught errors before the fix and 0 after. The player is still destroyed.test:typecheck,test:unit,buildandtest:docspass.Not tested: live/DVR streams. Touch was only checked with emulated touch in Chrome. During a touch drag, Chrome sends
pointercancel, which ends the chapter preview and the existing preview box, while the seek keeps following the finger.Link to Devin session: https://dolby.devinenterprise.com/sessions/50775d66d51648e18b378055b508b80a
Open in Devin Desktop: https://dolby.devinenterprise.com/desktop/session/50775d66d51648e18b378055b508b80a?variant=devin
Requested by: @ceyhun-o