Skip to content

feat(685): report all segment lengths a clip is available in (2s/6s + LL)#689

Merged
jonathaneoliver merged 1 commit into
devfrom
feat/685-content-segment-lengths
Jun 7, 2026
Merged

feat(685): report all segment lengths a clip is available in (2s/6s + LL)#689
jonathaneoliver merged 1 commit into
devfrom
feat/685-content-segment-lengths

Conversation

@jonathaneoliver
Copy link
Copy Markdown
Owner

What

/api/content advertised a single native segment_duration (6) per clip, so the app's Home filter hid every clip when 2s was selected — emptying Home (no hero, no previews, no home-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 (RangeHLSGenerator composes 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 kept segment_duration (still read by the forwarder Chromecast path + upload config):

  • segment_durations: [2, 6] — the lengths go-live can serve for any HLS clip
  • has_ll — whether the LL master is generatable, mirroring go-live's LoadPlaylistInfoWithByteranges signal: #EXT-X-PART preferred, .byteranges sidecar as fallback

iOS (Models.swift + both PlayerViewModel filters) and Android (PlayerState filter + PlayerViewModel JSON 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

  • Live on test-dev :21000 — every clip reports segment_durations=[2,6] / has_ll=true; the on-disk playlists carry 3174 #EXT-X-PART tags (+106 .byteranges), confirming has_ll is a real read, not a default.
  • iPad sim with segment forced to 2s now populates Home (hero + full preview rail) where it was previously empty — the segment-axis blocker is cleared.
  • go-upload go vet clean; iOS build succeeds.

Closes #685

🤖 Generated with Claude Code

… 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>
@github-actions github-actions Bot added the enhancement New feature or request label Jun 7, 2026
@jonathaneoliver jonathaneoliver merged commit 1eeabc9 into dev Jun 7, 2026
1 check passed
@jonathaneoliver jonathaneoliver deleted the feat/685-content-segment-lengths branch June 7, 2026 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant