feat(player): video chapters & bookmarks with per-video persistence#1718
Open
mazen-salah wants to merge 1 commit into
Open
feat(player): video chapters & bookmarks with per-video persistence#1718mazen-salah wants to merge 1 commit into
mazen-salah wants to merge 1 commit into
Conversation
Re-implements the chapter/bookmark feature on the Compose player. A new
Chapters control opens an overlay panel listing {title, timestamp} entries;
tap to seek, long-press the control (or the panel's add button) to bookmark
the current position, and import/export the list as JSON. Chapters are
persisted per video in the existing Room media_state table (new TEXT column,
DB v4->5) so they survive reopening the file.
This was referenced Jun 8, 2026
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 a Chapters / bookmarks feature to the player, built on the current Jetpack Compose UI.
This supersedes #1146, which was written against the old XML / view-binding player and is no longer mergeable after the Compose rewrite — every layout it modified (
exo_player_control_view.xml,bottom_sheet_sections.xml, …) has since been removed. I re-implemented the feature from scratch following the patterns already used by the existing selector panels.What it does
{ "title": String, "timestampMs": Long }JSON objects.media_statetable, so they survive reopening the file.Implementation
Chaptermodel +ChapterListConverterincore:model(kotlinx-serialization, already a dependency there — keeps other modules dependency-free).media_stategains achaptersTEXT column; DB version 4 → 5 with an additive, non-destructiveMIGRATION_4_5. Generated5.jsonschema is included.MediaRepositorygainsupdateChapters/getChaptersStream, using the same read-copy-upsert pattern as the other per-video state.OverlayView.CHAPTERS+ChaptersSelectorView+ arememberChaptersStateholder, plus onePlayerButtoninControlsBottomView.Testing
./gradlew :app:assembleDebugpasses (Room v4→5 KSP, Hilt, resource linking and packaging all succeed).Happy to adjust the button placement, naming, or the import/export format to match your preferences. Supersedes #1146.