pub fn video_audio_codecs(detected: &str) -> StringExpand description
Narrow a detected audio-codec list to what the renderer that will actually play the video can decode.
The platform list comes from MediaCodecList, which describes ExoPlayer —
but the webview <video> element may be what renders the video, and
Chromium/WebKit decode a much smaller set than the platform does. Advertising
the raw list makes Jellyfin direct-play a track the webview cannot decode, and
the user gets picture with no sound.
Which renderer gets it depends on the platform. Linux draws video in the
element (unless mpv native video is switched on), so it gets the narrow list.
Android draws video only in ExoPlayer: it used to follow the
experimentalNativeVideo setting, which could send video to the webview, and
while that switch existed the narrow list was the only one true on both sides
of it. DR-293 removed the webview video path on Android, so there the
platform list is the whole answer — it includes the FFmpeg extension’s
AC-3/E-AC-3/DTS/TrueHD, which CodecDetector reports alongside the
MediaCodecList decoders.
This applies to the video direct-play profile only. Audio-only playback really is ExoPlayer’s, so its profile keeps the full platform list.
TRACES: UR-004 | DR-148 | UT-142