mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-26 17:46:26 +03:00
268236759e
## Summary MSF works in uncompiled mode but fails with error 4058 (`MSF_VOD_CONTENT_NOT_SUPPORTED`) in the compiled build. ## Cause The `MSFTrack` and `MSFCatalog` typedefs are defined in regular source code (`msf_utils.js`). Closure Compiler mangles their property names in the compiled build (e.g., `track.isLive` → `track.sa`). Since the catalog is received as external JSON via `JSON.parse()`, the actual keys remain unchanged and all property accesses return `undefined`. Moving the typedefs to an externs file tells Closure Compiler to preserve the property names. ## Changes - Move `MSFTrack` and `MSFCatalog` typedefs to a new externs file (`externs/msf_catalog.js`) with the `@externs` annotation - Update type references in `msf_parser.js` to use the new extern types - Remove the original typedefs from `msf_utils.js` ## Testing Tested manually with a draft-14 publisher ([moqtail](https://github.com/moqtail/moqtail)) and relay ([moq-wasm](https://github.com/nttcom/moq-wasm)). --------- Co-authored-by: Claude Code <noreply@anthropic.com>