fix(android): play video_rendition in viewer; Samsung playback was broken #1531

Merged
chris merged 2 commits from fix/android-video-playback into main 2026-11-16 07:29:20 +01:00
Owner

Problem

Videos in the Android timeline viewer showed "Video konnte nicht geladen werden" on Samsung devices; cast playback of the same items worked.

Root cause

videoPlaybackUrl preferred previewUrl — for videos that is the poster image — and fell through to /api/media/{id}/original?purpose=view. On modern Samsung phones the original is HEVC/HEIF, which ExoPlayer's default decode path cannot play. The server-side 720p H.264/AAC video_rendition (spec 059) was already mapped into TimelineItemUi.videoRenditionUrl and consumed by the cast path (CastMedia), but the local viewer never preferred it.

Change

  • ViewerPage.videoPlaybackUrl: rendition → preview poster (defensive) → original (old-server fallback), mirroring the cast preference order.
  • Rewrote the stale KDoc that still claimed the video_preview job was unimplemented and /original not user-facing.
  • VideoPlaybackUrlTest: pins all three branches incl. absolutised-rendition and null-server cases.
  • KNOWN_ISSUES.md: ISSUE-236 archived resolved.

:app:testDebugUnitTest: 935 tests, 0 failures.

## Problem Videos in the Android timeline viewer showed "Video konnte nicht geladen werden" on Samsung devices; cast playback of the same items worked. ## Root cause `videoPlaybackUrl` preferred `previewUrl` — for videos that is the poster **image** — and fell through to `/api/media/{id}/original?purpose=view`. On modern Samsung phones the original is HEVC/HEIF, which ExoPlayer's default decode path cannot play. The server-side 720p H.264/AAC `video_rendition` (spec 059) was already mapped into `TimelineItemUi.videoRenditionUrl` and consumed by the cast path (`CastMedia`), but the local viewer never preferred it. ## Change - `ViewerPage.videoPlaybackUrl`: rendition → preview poster (defensive) → original (old-server fallback), mirroring the cast preference order. - Rewrote the stale KDoc that still claimed the `video_preview` job was unimplemented and `/original` not user-facing. - `VideoPlaybackUrlTest`: pins all three branches incl. absolutised-rendition and null-server cases. - `KNOWN_ISSUES.md`: ISSUE-236 archived resolved. :app:testDebugUnitTest: 935 tests, 0 failures.
fix(android): play video_rendition in viewer; Samsung playback was broken
All checks were successful
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 6s
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Build Android CI image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Deploy review instance (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Successful in 9s
Build and Deploy / Android unit tests and debug APK (push) Successful in 12m18s
ae772a1790
videoPlaybackUrl preferred previewUrl (for videos the poster IMAGE) and
fell through to /original?purpose=view — on modern Samsung phones the
original is HEVC/HEIF, which ExoPlayer's default decode path fails, so
every video showed the load-error state while cast played fine (cast
already preferred videoRenditionUrl, spec 059).

Preference order is now rendition (720p H.264/AAC) -> preview poster
(defensive) -> original (old-server fallback). Stale KDoc claiming the
video_preview job is unimplemented rewritten. Tests pin all three
branches. KNOWN_ISSUES: ISSUE-236 archived resolved.

:app:testDebugUnitTest: 935 tests, 0 failures.
Merge remote-tracking branch 'origin/main' into fix/android-video-playback
All checks were successful
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 3s
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Build Android CI image (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Deploy review instance (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Successful in 5s
Build and Deploy / Android unit tests and debug APK (push) Successful in 5m38s
7c417dc2ac
chris merged commit ec145eabc0 into main 2026-11-16 07:29:20 +01:00
chris referenced this pull request from a commit 2026-11-16 07:37:04 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
chris/memories!1531
No description provided.