Files
shaka-player/externs
Daiki Matsui 268236759e fix(MSF): move catalog typedefs to externs to prevent property mangling (#9804)
## 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>
2026-03-09 09:47:28 +01:00
..
2025-08-19 17:03:29 +02:00
2025-04-21 10:20:12 +02:00
2025-06-02 13:46:40 +02:00