@mebius-io/web 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1141,10 +1141,17 @@ var SignalingClient = class {
1141
1141
  * Realtime captions SSE URL. Same play token as media — the engine's
1142
1142
  * `PlayVerifier` gates both, so a viewer who can watch the stream can already
1143
1143
  * read its captions with zero extra credential.
1144
+ *
1145
+ * `/api/v1/live/...`, NOT `/live/...`: unlike {@link scalePlaylistUrl}, which
1146
+ * hits the engine's bare `/live/*` media-edge catch-all, captions are mounted
1147
+ * under the versioned control-API group (mebius-stream-engine
1148
+ * internal/api/routes.go) with the play-token middleware, not the proxy.
1149
+ * Copying the media-edge prefix here 401s every request — the catch-all
1150
+ * doesn't recognise the path and never reaches the captions handler at all.
1144
1151
  */
1145
1152
  captionsUrl(streamId, lang) {
1146
1153
  return this.withToken(
1147
- `${this.base()}/live/${encodeURIComponent(streamId)}/captions?lang=${encodeURIComponent(lang)}`
1154
+ `${this.base()}/api/v1/live/${encodeURIComponent(streamId)}/captions?lang=${encodeURIComponent(lang)}`
1148
1155
  );
1149
1156
  }
1150
1157
  // Maps a neutral session kind to the concrete signaling path segment. This