Repository navigation
Description
Problem
Apple stores the Audio Language picker as the canonical playback.audio_language key at profile_device, matching the current Settings copy ("for this device") and the settings contract. The server contract resolves this key in this order:
profile_series → profile_library → profile_device → profile → default
However, the server paths that choose the initial audio track omit the request device ID:
- Playback V3
preferredAudioTrackIndexV3callsresolvedProfileAudioLanguage, which constructssettingsresolve.Context{ProfileID: ...}. - Catalog detail's
audioPrefResolverconstructs profile/library/series contexts but noDeviceID.
settingsresolve deliberately excludes profile_device candidates when DeviceID is empty. Apple does not apply PlayerSettings.audioLanguage inside its native player; it trusts the server-selected track. The visible Apple setting therefore persists but does not affect initial playback.
Android currently masks this server gap by applying its local player setting directly.
Expected behavior
When no explicit audio track identity is requested, server-selected audio must honor the canonical contract for the requesting device:
- series choice
- library preference
- profile-device override
- roaming profile default
- media/container default
An explicit requested track must continue to win.
Proposed implementation
- Carry the stable
X-Silo-Device-Idrequest identity into canonical audio-language resolution for catalog detail and Playback V3 start. - Use the existing
settingsresolve.Contextand contract precedence instead of adding another settings path. - Preserve fallback behavior when a request has no device ID.
- Keep concrete per-series track identity semantics unchanged.
Acceptance criteria
- A
profile_deviceplayback.audio_languagerow changes the audio track selected by Playback V3 for that device. - The catalog's
effective_audio_track_index/effective_audio_languageagree with Playback V3 for the same device and content. - Series and library choices continue to outrank the device override.
- A profile default is used when no narrower override exists.
- An explicit track request still wins.
- A request without
X-Silo-Device-Idretains the current profile/library/series fallback behavior. - Focused tests cover device isolation and the full relevant precedence.
Context
- Part of Unify roaming and device-scoped user settings across web, Apple, and Android #376
- Replaces the obsolete client-side approach in fix(settings): apply audio language from the profile so it affects playback silo-apple#104
- Settings contract implementation: feat(settings): add the cross-platform settings contract and its manifest #479
Activity