Skip to content

feat(player): live segment clock - #2335

Merged
A-EDev merged 7 commits into
feat/live-stall-pegfrom
feat/live-segment-clock
Nov 23, 2026
Merged

A-EDev merged 7 commits into
feat/live-stall-pegfrom
feat/live-segment-clock

Conversation

@A-EDev

@A-EDev A-EDev commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • LiveSegmentClock maps a live stream's segment numbers to a Media3 timeline from one head reading (sequence, media time, server time). Segment length is the stream's measured average in microseconds, the head lines up exactly, and availability is re-anchored to every head the CDN reports, so the newest segment asked for is never in the future.
  • LiveSegmentManifest writes the dynamic DASH manifest: one segment template per format over flowlive:// segment URIs, no initialization segment, the window from maxDvrDurationSec, and the server clock as UTCTiming direct, so Media3 makes no time request.
  • Pure code with unit tests built from heads measured on two 24/7 streams. Nothing uses it yet.

Stacked on #2334; merge from the top of the stack down.

Related issue

Part of #1385.

Change type

  • Bug fix
  • Feature
  • Refactor or maintenance
  • Build, packaging, or CI
  • Documentation

Validation

Run on the top of the stack (fix/live-stream-end), which contains this change:

  • ./gradlew :app:assembleGithubDebug: passed
  • ./gradlew :app:testGithubDebugUnitTest: 7,098 tests, 0 failures, 46 skipped
  • I ran any additional flavor-specific build or test tasks affected by this change: ktlintCheck, :app:compileFossDebugKotlin passed
  • I manually tested the affected behavior on an Android device or emulator.

Test device and Android version: Not tested on a device

Screenshots or recordings

Risk and compatibility

  • Not wired into playback in this PR.

  • The change does not introduce secrets, private data, or unexpected telemetry.

  • New user-facing text uses Android string resources.

  • Dependency and lockfile changes are intentional and limited to this PR.

  • Room schema changes include the required version bump and migration, or this PR does not change the Room schema.

  • Breaking changes and upgrade steps are clearly documented.

@github-actions github-actions Bot added the player Video and audio playback label Nov 23, 2026
fix(player): end playback when a live stream ends
fix(player): refresh live stream URLs before they expire
feat(player): play live streams from their segments with the full DVR window
@A-EDev
A-EDev merged commit 1b7d711 into feat/live-stall-peg Nov 23, 2026
@A-EDev
A-EDev deleted the feat/live-segment-clock branch November 23, 2026 19:17
@github-actions github-actions Bot added documentation Improvements or additions to documentation ui Compose UI, theming, or Material 3 surfaces labels Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation player Video and audio playback ui Compose UI, theming, or Material 3 surfaces

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant