Repository navigation
feat(player): live segment clock - #2335
Merged
Merged
Conversation
10 of 14 tasks
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
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
LiveSegmentClockmaps 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.LiveSegmentManifestwrites the dynamic DASH manifest: one segment template per format overflowlive://segment URIs, no initialization segment, the window frommaxDvrDurationSec, and the server clock as UTCTiming direct, so Media3 makes no time request.Stacked on #2334; merge from the top of the stack down.
Related issue
Part of #1385.
Change type
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 skippedktlintCheck,:app:compileFossDebugKotlinpassedTest 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.