Skip to content

4.10.0 - External subtitle tracks, iOS DV routing, restart recovery chain

Choose a tag to compare

@superuser404notfound superuser404notfound released this 02 Jul 20:10

Highlights

External subtitles as first-class tracks (#88). External subtitle files now register with the engine and appear in subtitleTracks alongside embedded tracks, with a synthetic id and isExternal == true. Register at load via LoadOptions.externalSubtitles or any time via addExternalSubtitleTrack; select through the unified selectSubtitleTrack (primary and secondary channels). Load-declared tracks join the native WebVTT renditions, so external subtitles survive PiP, AirPlay, and external displays, and a finished cue store backfills the fullscreen overlay instantly on select. preferredSubtitleLanguages ranks external tracks too, and removeExternalSubtitleTrack unregisters.

iOS HDR/DV master routing. The master-vs-media playlist gate required a tvOS-style panel-in-HDR signal, so HDR and Dolby Vision films on iPhone routed media-direct and PiP subtitles silently never engaged for them. iOS now treats AVPlayer.eligibleForHDRPlayback as panel readiness (built-in panels engage EDR on demand).

Terminal stall self-recovery (#93 residual). After a CoreMedia -15628 error AVPlayer's media loader can die silently: playbackStalled fires, then zero segment requests follow while the player waits forever, and the item never fails. Previously only backing out of the player cleared this. Every stall now arms a fetch-counter watchdog: a consumer still silent after a grace window gets a zero-tolerance nudge seek, and if the loader stays dead, an in-place item reload on the same host. AVKit, PiP, and Control Center survive the reload, and segment retention serves it instantly. A spurious .paused during recovery is re-asserted instead of latched as a user pause.

Backward-seek restart latency cluster (#93 residual). Device-profiled fixes for the seek-past-retention path over slow links:

  • The wedged-restart fresh reopen skips the full first-open probe budget (44 s to about 7 s on device).
  • Waiting segment fetches ride an in-flight restart instead of burning fixed retry budgets into 503s.
  • A re-request for the index a restart just targeted waits for the fresh producer instead of tearing it down.
  • An index the active producer's forward march covers never fires or backstops a restart.
  • A request superseded by a newer declared target (a skip-storm orphan AVPlayer has already abandoned) never fires at all.
  • Lazy native subtitle readers defer while a restart is executing instead of competing for the starved link.

Resume-anchored first producer (#93). The first producer anchors at the segment covering the load's start position instead of producing seg0 into an immediate teardown; the old race could 404 the item into a host reload (double spinner, audio over a black frame).

Also fixed

  • Duplicate same-language subtitle rendition NAMEs collapsed AVFoundation's legible options; names are unique now, forced tracks declare FORCED=YES, and language matching goes through the ISO-synonym table with no cross-language fallback (a German track no longer selects an English rendition in PiP).
  • A pump-tap-fed subtitle selection kept forwarding cues into the overlay after switching to a sidecar file.

Compatibility

No breaking API changes. New API: LoadOptions.externalSubtitles, addExternalSubtitleTrack, removeExternalSubtitleTrack, TrackInfo.isExternal.