Skip to content

feat(youtube): segment video chapter seek bar#398

Merged
sozercan merged 1 commit into
mainfrom
video-segment
Jul 20, 2026
Merged

feat(youtube): segment video chapter seek bar#398
sozercan merged 1 commit into
mainfrom
video-segment

Conversation

@sozercan

Copy link
Copy Markdown
Owner

Summary

  • render YouTube video chapters with the same gapped, independently filled seek-bar segments introduced for mixes in feat: YouTube-style segmented seek bar for mixes #368
  • resolve chapter spans from explicit end times, the next chapter boundary, or the video duration while filtering invalid and duplicate boundaries
  • preserve chapter snapping and metadata previews, and suppress chapter UI while ads own the playback clock
  • generalize progress-segment tooltip and accessibility labels so mixes use “Track” and videos use localized “Chapter”
  • add the singular “Chapter” translation across all supported locales

Why

The YouTube player bar still rendered chapters as narrow markers on a continuous track, while mix tracklists used the newer segmented presentation. This made equivalent timeline metadata look and behave inconsistently across the music and video players.

User impact

Chaptered videos now use the same visual language as segmented mixes: visible gaps, independently filled spans, active and hover prominence, and chapter tooltips with ordinal and time-range details. Existing seek snapping remains available, and content chapter metadata is hidden during ads.

Validation

  • swiftformat .
  • swiftlint --strict
  • swift build
  • swift test --skip KasetUITests --filter 'PlayerBarProgressLaneTests|YouTubePlayerBarTests|AppLocalizationTests' — 37 tests passed
  • structured autoreview — clean, no actionable findings

The full non-UI suite was also attempted; unrelated timing-sensitive suites failed and the test runner eventually crashed with an index-out-of-range error. No UI tests were run.

Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
Copilot AI review requested due to automatic review settings July 20, 2026 14:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds segmented YouTube chapter seek bars while preserving chapter snapping, previews, ad suppression, accessibility, and localization.

Changes:

  • Resolves chapter boundaries into independently filled seek-bar segments.
  • Generalizes segment labels for tracks and chapters.
  • Adds tests and “Chapter” translations across supported locales.
Show a summary per file
File Description
Sources/Kaset/Views/YouTube/YouTubePlayerBar.swift Builds chapter segments and hides chapter UI during ads.
Sources/Kaset/Views/PlayerBarProgressLane.swift Generalizes segment tooltip and accessibility labels.
Tests/KasetTests/YouTubePlayerBarTests.swift Tests chapter span resolution and filtering.
Tests/KasetTests/PlayerBarProgressLaneTests.swift Tests default and custom segment labels.
Sources/Kaset/Resources/Localizable.xcstrings Adds localized “Chapter” catalog entry.
Sources/Kaset/Resources/ar.lproj/Localizable.strings Adds Arabic translation.
Sources/Kaset/Resources/de.lproj/Localizable.strings Adds German translation.
Sources/Kaset/Resources/en.lproj/Localizable.strings Adds English translation.
Sources/Kaset/Resources/es.lproj/Localizable.strings Adds Spanish translation.
Sources/Kaset/Resources/fr.lproj/Localizable.strings Adds French translation.
Sources/Kaset/Resources/id.lproj/Localizable.strings Adds Indonesian translation.
Sources/Kaset/Resources/it.lproj/Localizable.strings Adds Italian translation.
Sources/Kaset/Resources/ko.lproj/Localizable.strings Adds Korean translation.
Sources/Kaset/Resources/nl.lproj/Localizable.strings Adds Dutch translation.
Sources/Kaset/Resources/pl.lproj/Localizable.strings Adds Polish translation.
Sources/Kaset/Resources/pt.lproj/Localizable.strings Adds Portuguese translation.
Sources/Kaset/Resources/ru.lproj/Localizable.strings Adds Russian translation.
Sources/Kaset/Resources/sv.lproj/Localizable.strings Adds Swedish translation.
Sources/Kaset/Resources/tr.lproj/Localizable.strings Adds Turkish translation.
Sources/Kaset/Resources/uk.lproj/Localizable.strings Adds Ukrainian translation.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 20/20 changed files
  • Comments generated: 0
  • Review effort level: Medium

@sozercan
sozercan merged commit e44cbb1 into main Jul 20, 2026
9 checks passed
@sozercan
sozercan deleted the video-segment branch July 20, 2026 16:19
Yoddikko pushed a commit to Yoddikko/kasetPlus that referenced this pull request Jul 21, 2026
Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
Yoddikko added a commit to Yoddikko/kasetPlus that referenced this pull request Jul 21, 2026
…aset→KasetPlus)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Yoddikko added a commit to Yoddikko/kasetPlus that referenced this pull request Jul 21, 2026
…ped favorites, sozercan#374-scale)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants