You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Machine-readable companion to .error(String) so a host can classify a failure #376
PlaybackState.error carries a human sentence and nothing else. On the native paths that sentence is AVPlayerItem.error.localizedDescription, forwarded verbatim, so it is localized into the device language and the NSError domain and code behind it are gone by the time a host sees it. The engine-authored messages are English-stable, but both halves arrive through the same publisher, so nothing distinguishes them except the text.
A host that buckets its failures (analytics, a fallback to a second engine) therefore has to substring-match a localized string, which puts every non-English device into "other". Raised on #374 by a downstream host building exactly that classifier, whose telemetry contract additionally forbids raw player error strings leaving the device.
Add an additive, machine-readable companion published alongside the state:
a stable engine-authored kind (PlaybackErrorKind, string-backed so a host can ship it as a token, and open so a new kind cannot break an exhaustive switch),
the underlying NSError domain and code where a Foundation / AVFoundation failure is involved,
the same message the state carries.
Assigned before state, so a $state sink can read it synchronously, and cleared by the state's own transition away from .error so the two cannot drift.
A numeric code is origin-free by construction, which also gives a host that cannot ship the string something it can ship.
Activity
feat(errors): publish a machine-readable companion to .error (#376)
superuser404notfound commentedon Aug 15, 2026
Shipped in 6.26.0.
fix(io): a refused source fails with its HTTP status, not as invalid …