Skip to content

fix: name the real HDR format on the player and detail pages, and the playing audio codec in the player - #140

Merged
blurbery merged 7 commits into
mainfrom
fix/player-format-badges
Oct 14, 2026
Merged

blurbery merged 7 commits into
mainfrom
fix/player-format-badges

Conversation

@blurbery

@blurbery blurbery commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Note

Merge after #139. I tested this on top of #139's player and want it to land on that, not the current one.

Problem and reproduction

The Apple TV player's Info tab and the detail pages didn't name a file's real format:

  • The player's dynamic-range badge said "HDR" for any HDR file, so a Dolby Vision file showed "HDR" and HDR10+, HDR10 and HLG weren't told apart.
  • The player's audio badge showed the file version's main audio codec, not the track that's playing. With a second audio track selected the badges read 4K HDR HEVC TRUEHD while the Audio row said AC3 · 5.1.
  • The detail pages only said DV or HDR. The Apple TV detail page added a separate HDR10 badge for profile 7 and 8.1, and Emby and Jellyfin files only ever showed HDR, because nothing read their range or Dolby Vision fields.

To reproduce: open a Dolby Vision title, note the badges on its detail page, play it, switch to an audio track with a different codec, then open the Info tab. Root cause: the player only checked the file's hdr flag and built its badges once at load from FileVersion.codecAudio, and each detail screen had its own DV/HDR logic that only read Silo's dolby_vision and video_range.

Implementation and impact

  • New PlayerStreamBadges works out one dynamic-range label from the selected file's video tracks: DV P<profile> when the profile is known (DV P5, DV P7, DV P8.1), DV when it isn't, then HDR10+, HDR10 or HLG, HDR only when the file is HDR but the type is unknown, and nothing for SDR. The comment at the top of the file sets out where each provider's values come from.
  • The label names the file as it is. Profile 7 stays DV P7 even though Vivid plays it as 8.1 on a Dolby Vision display (and as its HDR10 base layer on other displays); the player's stats show the actual output.
  • What each provider sends, and what Vivid maps:
    • Silo (/api/v1/watch): dolby_vision is only ever Profile <n>, so the .1 comes from dv_bl_compat_id, which is left out when it's 0. video_range is only DolbyVision, HDR or empty, so HDR10+, HDR10 and HLG come from video_range_type, hdr10_plus and, for older probes, color_transfer. VideoTrack now decodes video_range_type, dv_profile, dv_bl_compat_id and hdr10_plus.
    • Jellyfin: the adapter now maps VideoRangeType, DvProfile, DvBlSignalCompatibilityId and Hdr10PlusPresentFlag into the same new fields. DOVIInvalid (Dolby Vision outside the spec, played as its base layer) isn't shown as DV.
    • Emby: the adapter translates ExtendedVideoType (DolbyVision, Hdr10, Hdr10Plus, HyperLogGamma) and ExtendedVideoSubtype into the same fields, and falls back to VideoRange text on servers that don't send them. Emby's ExtendedVideoSubTypes reference only has two-digit values (DoviProfile02 to DoviProfile92, so DoviProfile81 is profile 8 with compatibility ID 1). Its API reference spells the field ExtendedVideoSubType while server JSON uses ExtendedVideoSubtype, so both are read.
  • Where the label now shows:
    • the Apple TV player's Info tab (Stream badges);
    • the Apple TV detail page, as one badge (4K · DV P8.1 · ATMOS · CC instead of DV and HDR10);
    • the version pickers on both platforms (DetailPlaybackFormatting.dynamicRangeLabel);
    • Continue Watching in the Apple TV Home focus info (badge text only);
    • the iPhone and iPad detail page's hero chip, which now also shows for Dolby Vision with an SDR base layer (profile 8.2), and its Video range fact, which reads every video stream like the hero.
  • The player's audio badge comes from the selected PlayerTrack with the same text as the Audio row (one shared helper), and PlayerViewModel.streamBadges reads audioTracks and selectedAudioId, so the badge changes when you switch tracks. Until the engine reports a selected track, the file's main codec stands in as before.
  • Deliberately unchanged: card overlays (poster badges) and the catalogue-summary rows in the Home focus info have no video-track details, so they keep their DV and HDR marks; the Continue Watching overlay values aren't touched either. Downloads don't keep their video tracks, so a downloaded HDR file still shows HDR. The player's stats and diagnostics keep reporting the engine's output. Emby and Jellyfin still leave videoRange and dolbyVision empty, because the phone's Dolby Vision fact and the Apple TV Continue Watching card overlays read them.
  • iPhone and iPad have no player Info badges, so the player part of this is Apple TV only.
  • Risk: the new VideoTrack fields are optional and type-checked in the adapters, so a server that doesn't send them falls back to DV or HDR.

Validation

  • iosApp/Tests/PlayerStreamBadgesTests.swift, in both VividTests and VividTVTests (listed in iosApp/project.yml), covers Silo Dolby Vision profiles 5, 7, 8.1, 8.2, 8.4 and 10, compatibility from the range type, older Silo labels, HDR10+, HDR10 and HLG (including colour transfer only), the HDR fallback and SDR, Jellyfin and Emby through their real version() mapping and decoder, that the detail label matches the player for all three providers (and, on tvOS, that the detail page shows DV P8.1 as one badge with no HDR10), and the audio badge following the playing track.
  • DetailVersionSelectionTests.testVersionSelectorUsesTheDolbyVisionProfile now expects DV P8.1 in the version picker labels.
  • CI: Player regression on dad60da passed, iOS and tvOS (run 38484418131). Results for the latest head are in the checks below.
  • Local: signed Release tvOS builds of refactor: play everything through Vivid's own player bridge and Lucid Engine #139's head plus this PR built and installed for device testing (see below). No local test run.

Performance

Not applicable. This changes label text only; no benchmark was run.

Testing status

Design impact and approval

Important

Only blurbery can approve design changes. Obtain prior, explicit approval and reference it here. Unapproved design changes must not be merged.

  • Design impact: label text only, no layout, style, order or spacing change. The player's dynamic-range and audio badges name the real format and the playing codec. The detail pages, version pickers, Home focus info (Continue Watching) and the iPhone and iPad hero chip and Video range fact use the same dynamic-range label, and the Apple TV detail page shows it as one badge instead of DV plus HDR10. Profile 7 is labelled DV P7.
  • Approval from blurbery: in chat on 14 October 2026: first the player badges (real HDR format, audio badge matching the playing track, badge text only), then, after device testing, the file's real format everywhere the file's video details exist, one badge on the Apple TV detail page, and profile 7 labelled as DV P7.

Documentation impact

  • docs/playback/architecture.md: what the Info tab's Stream badges show, the brief file-codec fallback, that profile 7 shows as DV P7, where else the label appears, and what keeps the old marks.

  • docs/apple-tv-browsing.md: the detail page's dynamic-range badge and Version pill show the file's format as one label.

  • docs/cores/emby.md and docs/cores/jellyfin.md: which stream fields the label reads, and that the detail pages, version pickers and Home focus info show it.

  • I checked the docs this change affects and updated them in this PR, or explained above why none needed changes.

AI disclosure

Important

Required for every PR. Incomplete disclosures are not ready for review or merge.

I implemented these changes and used Claude Opus as a tool.

…er badges

The Stream badges in the Apple TV player's Info tab said "HDR" for any
HDR file, Dolby Vision included, and the audio badge showed the file's
main audio codec even while another track was playing (for example
4K HDR HEVC TRUEHD while the Audio row said AC3 · 5.1).

The dynamic-range badge now shows DV with the Dolby Vision profile
(DV P5, DV P7, DV P8.1), or DV when the profile isn't known, then HDR10+,
HDR10 or HLG, with HDR only when the type is unknown and nothing for SDR.
Silo's video tracks already carry dv_profile, dv_bl_compat_id,
video_range_type and hdr10_plus, which the app now decodes. The Emby and
Jellyfin adapters fill the same new fields from ExtendedVideoType and
ExtendedVideoSubtype (Emby) and VideoRangeType, DvProfile,
DvBlSignalCompatibilityId and Hdr10PlusPresentFlag (Jellyfin). They still
leave videoRange and dolbyVision empty, so the detail screens show
exactly what they did before.

The audio badge now uses the selected track's codec, the same text as the
Audio row, and changes when the audio track is switched. The badge style,
order and layout are unchanged.

Release-Notes:
- The Apple TV player's Info tab now shows the real HDR format, such as DV P8.1, DV P5, HDR10+, HDR10 or HLG, instead of HDR for everything.
- The audio badge in the Apple TV player's Info tab now shows the codec of the audio track that's playing and follows audio track changes.
- This release will be available on TestFlight soon.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 12 files

View guided diff | Re-trigger cubic

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude review of the whole PR at dad60da. The summary comment lists everything found.

Comment thread docs/playback/architecture.md Outdated
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Claude review of the new commits b6bdc62..7288c80

I reviewed the new commit since b6bdc62, which changes one line of docs/apple-tv-browsing.md (the Apple TV detail hero's dynamic-range badge). It now says the single badge applies once the file's video details load, an SDR file shows its video codec, and the catalogue summary's DV or HDR mark shows until then. That matches TVHeroMetadata.sourceBadges and sourceVideoLabel in TVDetailHero.swift, so it fixes the earlier doc comments. Nothing needs fixing. I did not re-review the code from the earlier commits.

I checked the one change since the last review, the reworded dynamic-range sentence in docs/apple-tv-browsing.md line 95, against TVHeroMetadata.sourceBadges and sourceVideoLabel in TVDetailHero.swift. It matches the code, so I have nothing to report. Once the version has video tracks, the hero shows one dynamic-range label, or the video codec for SDR. Before that it shows the catalogue summary's DV or HDR mark.

claude-sonnet-5-5, high effort, 10 turns, about US$0.12 of API credit

…ported

The architecture guide said the audio badge always matches the Audio row. Until the engine reports the playing track, the badge shows the file's main audio codec and the Audio row isn't shown yet, so say so.
… pickers

The detail pages still said DV (Apple TV added a separate HDR10 badge for profile 7 and 8.1), and Emby and Jellyfin files only ever showed HDR, while the player now names the exact format. The Apple TV detail page, the version pickers on both platforms, Continue Watching in the Home focus info, and the iPhone and iPad hero chip and Video range fact now use the same label as the player: DV P7, DV P8.1, DV P5, HDR10+, HDR10, HLG or HDR, from each provider's own fields.

Profile 7 keeps its own name although Lucid Engine plays it as 8.1. Card overlays, catalogue summaries and downloads have no video-track details, so they keep their DV and HDR marks.
@blurbery blurbery changed the title fix: show the real HDR format and the playing audio codec in the player badges fix: name the real HDR format on the player and detail pages, and the playing audio codec in the player Oct 13, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude review of the new commits 5ef9923..1c2ec42. The summary comment lists everything found.

Comment thread iosApp/iosApp/Screens/Detail/DetailPlaybackFormatting.swift
Comment thread iosApp/iosApp/Screens/Detail/DetailPlaybackFormatting.swift
Comment thread iosApp/iosApp/tvOS/Screens/Detail/TVDetailHero.swift
Comment thread iosApp/iosApp/Screens/Player/PlayerStreamBadges.swift Outdated
…pill label

Vivid plays profile 7 as 8.1 only on a Dolby Vision display and as its HDR10 base layer elsewhere, so say that instead of always 8.1. The Apple TV browsing guide now says the version pill shows the file's dynamic range (DV P8.1, HDR10+ and so on).

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude review of the new commits 1c2ec42..393cb6d. The summary comment lists everything found.

Comment thread iosApp/iosApp/tvOS/Screens/Detail/TVDetailHero.swift

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 15 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread iosApp/iosApp/Screens/Detail/Phone/PhoneDetailFactsSection.swift Outdated
Comment thread iosApp/iosApp/Networking/JellyfinProvider.swift Outdated
The fact read only the first video stream while the hero and player read them all, so a file with Dolby Vision on a second stream could show HDR10 there and DV P7 in the hero. It now uses the same file-level label. Also corrects which readers keep videoRange and dolbyVision in use (the phone's Dolby Vision fact and Apple TV Continue Watching card overlays) and the Apple TV browsing guide's description of the detail badges.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude review of the new commits 393cb6d..3e79800. The summary comment lists everything found.

Comment thread iosApp/iosApp/tvOS/Screens/Detail/TVDetailHero.swift

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 6 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread docs/apple-tv-browsing.md Outdated
…deo details load

The browsing guide said the hero always shows one dynamic-range badge. It does once the file's video tracks load; before that it shows the catalogue summary's DV or HDR mark, and an SDR file shows its video codec.
@blurbery
blurbery merged commit 07ae0da into main Oct 14, 2026
10 checks passed
@blurbery
blurbery deleted the fix/player-format-badges branch October 15, 2026 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant