Environment: iOS 18 / iOS 26, AVPlayer + AVPlayerItem, live low-latency HLS (LL-HLS). Subtitle renditions are regular (non-forced) WebVTT: AUTOSELECT=YES, FORCED=NO. System captioning (Closed Captions + SDH) is OFF (default). Direct CDN, no P2P.
Master playlist (subtitle part):
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="Korean (AI)",AUTOSELECT=YES,FORCED=NO,LANGUAGE="kor",URI="..."
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="English (AI)",AUTOSELECT=YES,FORCED=NO,LANGUAGE="eng",URI="..."
#EXT-X-STREAM-INF:...,SUBTITLES="subs"
Problem
When the user picks a subtitle language we call playerItem.select(option, in: legibleGroup) with an option that is a genuine member of the item's current legible group. Right after the call, item.currentMediaSelection.selectedMediaOption(in:) returns the requested option. But within ~2 seconds, on a subset of real-user sessions, the selection spontaneously reverts with no further app interaction:
- most often to Off (no legible output is delivered afterwards), or
- it stays stuck on the previously selected language (a subsequent
selectto another language, or to Off, is silently ignored).
It is intermittent and only appears under real conditions (frequent live playlist reloads / reconnects); it does not reproduce in a short, clean session.
What we verified
- The option passed to
select(_:in:)is a real member of the current group (re-resolved fromitem.asset); the call returns without error and reads back correctly immediately after. appliesMediaSelectionCriteriaAutomaticallyis the defaulttrue. Per the AV Foundation Release Notes ("Advice about subtitles"), automatic selection excludes options that are notAVMediaCharacteristicContainsOnlyForcedSubtitles. So on each live reload the automatic re-selection resolves non-forced subtitles to Off, appearing to override the manualselect(_:in:).- Reading the selected option against a freshly obtained group instance returns the same value as against the original instance — so this is a real state change, not a mismatched-group read.
Questions
- On live HLS reloads with
appliesMediaSelectionCriteriaAutomatically == true, is manualselect(_:in:)for.legibleexpected to be overridden by automatic media selection? If so, issetMediaSelectionCriteria(_:forMediaCharacteristic:)the intended way to persist a user's choice? setMediaSelectionCriteriafor subtitles is itself reported as unreliable (sometimes no subtitles) — see thread 108403. What is the recommended, deterministic way to keep a user-selected non-forced subtitle displayed across live playlist reloads, including turning subtitles Off?- Is this the same underlying behavior as FB13344652 ("Auto (Recommended) doesn't display subtitles despite language match / DEFAULT=YES")?
Related: https://developer.apple.com/forums/thread/722752 (FB13344652) , https://developer.apple.com/forums/thread/108403