feat(685): report all segment lengths a clip is available in (2s/6s + LL)#689
Merged
Merged
Conversation
… LL) /api/content advertised a single native `segment_duration` (6), so the app's Home filter hid every clip when 2s was selected — emptying Home and blocking the characterization segment axis. go-live actually synthesizes both a 2s and a 6s master from ANY HLS source master (RangeHLSGenerator composes virtual segment windows), so segment length is a presentation choice, not a stored property. LL is the one exception: it needs on-disk partial-segment info (#EXT-X-PART tags, with a .byteranges sidecar fallback) to generate. go-upload now reports, alongside the kept-for-back-compat `segment_duration`: - `segment_durations: [2, 6]` for any HLS clip (the lengths go-live serves) - `has_ll`: whether the LL master is generatable (mirrors go-live's LoadPlaylistInfoWithByteranges signal — EXT-X-PART preferred) iOS (Models + both PlayerViewModel filters) and Android (PlayerState filter + JSON parse/serialize) match the selected segment against the set, falling back to the legacy single-value match when a pre-#685 server omits the new fields. Verified live on test-dev: every clip reports segment_durations=[2,6] / has_ll=true (3174 EXT-X-PART tags on disk confirm the LL read), and the iPad sim now populates Home with 2s selected where it was previously empty. Closes #685 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
/api/contentadvertised a single nativesegment_duration(6) per clip, so the app's Home filter hid every clip when 2s was selected — emptying Home (no hero, no previews, nohome-continue-watching) and blocking the characterization segment axis. Selecting 6s/LL worked; 2s did not.go-live actually synthesizes both a 2s and a 6s master from any HLS source master (
RangeHLSGeneratorcomposes virtual segment windows from the stored segments) — segment length is a presentation choice, not a stored property. LL is the lone exception: it needs on-disk partial-segment info to generate.Changes
go-upload (
internal/util/content.go) — alongside the keptsegment_duration(still read by the forwarder Chromecast path + upload config):segment_durations: [2, 6]— the lengths go-live can serve for any HLS cliphas_ll— whether the LL master is generatable, mirroring go-live'sLoadPlaylistInfoWithByterangessignal:#EXT-X-PARTpreferred,.byterangessidecar as fallbackiOS (
Models.swift+ bothPlayerViewModelfilters) and Android (PlayerStatefilter +PlayerViewModelJSON parse/serialize) — match the selected segment against the set (supportsSegment(_:)/hasLL), falling back to the legacy single-value match when a pre-#685 server omits the new fields.Verification
segment_durations=[2,6]/has_ll=true; the on-disk playlists carry 3174#EXT-X-PARTtags (+106.byteranges), confirminghas_llis a real read, not a default.go vetclean; iOS build succeeds.Closes #685
🤖 Generated with Claude Code