mattebox 0.15.0 → 0.16.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.
Files changed (196) hide show
  1. package/dist/cdn/mattebox.dash-drm.min.js +3 -3
  2. package/dist/cdn/mattebox.dash-ll.min.js +3 -3
  3. package/dist/cdn/mattebox.dash.min.js +3 -3
  4. package/dist/cdn/mattebox.dual-drm.min.js +3 -3
  5. package/dist/cdn/mattebox.dual-ll.min.js +3 -3
  6. package/dist/cdn/mattebox.dual-ts-drm.min.js +3 -3
  7. package/dist/cdn/mattebox.dual-ts.min.js +3 -3
  8. package/dist/cdn/mattebox.dual.min.js +3 -3
  9. package/dist/cdn/mattebox.hls-drm.min.js +3 -3
  10. package/dist/cdn/mattebox.hls-ll.min.js +3 -3
  11. package/dist/cdn/mattebox.hls-ts-drm.min.js +3 -3
  12. package/dist/cdn/mattebox.hls-ts.min.js +3 -3
  13. package/dist/cdn/mattebox.hls.min.js +3 -3
  14. package/dist/cdn/mattebox.kernel.min.js +1 -1
  15. package/dist/cdn/mattebox.min.js +6 -6
  16. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/asyncToGenerator.js +1 -2
  17. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/defineProperty.js +1 -2
  18. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/objectSpread2.js +1 -2
  19. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/objectWithoutProperties.js +1 -2
  20. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/objectWithoutPropertiesLoose.js +1 -2
  21. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/toPrimitive.js +1 -2
  22. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/toPropertyKey.js +1 -2
  23. package/dist/es2015/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/typeof.js +1 -2
  24. package/dist/es2015/containers/adts.js +1 -2
  25. package/dist/es2015/containers/captions.js +1 -2
  26. package/dist/es2015/containers/codec-probe/index.js +1 -2
  27. package/dist/es2015/containers/emsg.js +1 -2
  28. package/dist/es2015/containers/fmp4/fit.js +1 -2
  29. package/dist/es2015/containers/fmp4/writer.js +1 -2
  30. package/dist/es2015/containers/id3.js +2 -3
  31. package/dist/es2015/containers/metadata.js +1 -2
  32. package/dist/es2015/containers/mp4-box/index.js +1 -2
  33. package/dist/es2015/containers/packed-audio/index.js +1 -2
  34. package/dist/es2015/containers/scte35.js +2 -3
  35. package/dist/es2015/containers/sei.js +1 -2
  36. package/dist/es2015/containers/ts-transmux/demux.js +1 -2
  37. package/dist/es2015/containers/ts-transmux/h264.js +2 -3
  38. package/dist/es2015/containers/ts-transmux/h265.js +2 -3
  39. package/dist/es2015/containers/ts-transmux/index.js +2 -3
  40. package/dist/es2015/containers/ts-transmux/runner.js +3 -4
  41. package/dist/es2015/containers/ts-transmux/serve.js +1 -2
  42. package/dist/es2015/containers/ts-transmux/sniff.js +0 -1
  43. package/dist/es2015/containers/ts-transmux/source.js +1 -2
  44. package/dist/es2015/containers/ts-transmux/transmux.js +2 -3
  45. package/dist/es2015/containers/ts-transmux/transmux.worker.js +1 -2
  46. package/dist/es2015/containers/webvtt.js +2 -3
  47. package/dist/es2015/containers/wvtt.js +2 -3
  48. package/dist/es2015/eme/index.js +3 -4
  49. package/dist/es2015/index.js +5 -6
  50. package/dist/es2015/kernel/append-queue.js +2 -3
  51. package/dist/es2015/kernel/base64.js +1 -2
  52. package/dist/es2015/kernel/bus.js +1 -2
  53. package/dist/es2015/kernel/characteristics.js +20 -3
  54. package/dist/es2015/kernel/context.js +1 -2
  55. package/dist/es2015/kernel/dry-run.js +2 -3
  56. package/dist/es2015/kernel/effects.js +1 -2
  57. package/dist/es2015/kernel/evictor.js +1 -2
  58. package/dist/es2015/kernel/lifecycle.js +1 -2
  59. package/dist/es2015/kernel/loader.js +1 -2
  60. package/dist/es2015/kernel/mime.js +1 -2
  61. package/dist/es2015/kernel/mse.js +2 -3
  62. package/dist/es2015/kernel/prepare.js +3 -4
  63. package/dist/es2015/kernel/presentation.js +11 -3
  64. package/dist/es2015/kernel/reducer.js +5 -6
  65. package/dist/es2015/kernel/refresh.js +2 -3
  66. package/dist/es2015/kernel/rendition-select.js +3 -4
  67. package/dist/es2015/kernel/scheduler.js +2 -3
  68. package/dist/es2015/kernel/sinks/caption-tracks.js +1 -2
  69. package/dist/es2015/kernel/sinks/metadata-sink.js +1 -2
  70. package/dist/es2015/kernel/sinks/mse-sink.js +1 -2
  71. package/dist/es2015/kernel/sinks/native-sync.js +1 -2
  72. package/dist/es2015/kernel/sinks/text-formats.js +1 -2
  73. package/dist/es2015/kernel/sinks/text-track-sink.js +1 -2
  74. package/dist/es2015/kernel/timeline.js +2 -3
  75. package/dist/es2015/kernel/trace.js +1 -2
  76. package/dist/es2015/kernel/track-registry.js +1 -2
  77. package/dist/es2015/kernel/transport.js +9 -9
  78. package/dist/es2015/kernel/url.js +1 -2
  79. package/dist/es2015/kernel/watchdog.js +1 -2
  80. package/dist/es2015/presets/dash/index.js +1 -2
  81. package/dist/es2015/presets/dash-drm/index.js +1 -2
  82. package/dist/es2015/presets/dash-ll/index.js +1 -2
  83. package/dist/es2015/presets/define.js +3 -4
  84. package/dist/es2015/presets/dual/index.js +1 -2
  85. package/dist/es2015/presets/dual-drm/index.js +1 -2
  86. package/dist/es2015/presets/dual-ll/index.js +1 -2
  87. package/dist/es2015/presets/dual-ts/index.js +1 -2
  88. package/dist/es2015/presets/dual-ts-drm/index.js +1 -2
  89. package/dist/es2015/presets/full/index.js +1 -2
  90. package/dist/es2015/presets/hls/index.js +1 -2
  91. package/dist/es2015/presets/hls-drm/index.js +1 -2
  92. package/dist/es2015/presets/hls-ll/index.js +1 -2
  93. package/dist/es2015/presets/hls-ts/index.js +1 -2
  94. package/dist/es2015/presets/hls-ts-drm/index.js +1 -2
  95. package/dist/es2015/presets/kernel/index.js +1 -2
  96. package/dist/es2015/presets/tiers.js +1 -2
  97. package/dist/es2015/protocols/adapter-shared.js +1 -2
  98. package/dist/es2015/protocols/dash-cmaf/index.js +4 -4
  99. package/dist/es2015/protocols/dash-cmaf/parse.js +2 -3
  100. package/dist/es2015/protocols/dash-cmaf/periods-runtime.js +2 -3
  101. package/dist/es2015/protocols/dash-cmaf/periods.js +2 -3
  102. package/dist/es2015/protocols/dash-live/index.js +5 -4
  103. package/dist/es2015/protocols/dash-ll/index.js +1 -2
  104. package/dist/es2015/protocols/dimensions.js +1 -2
  105. package/dist/es2015/protocols/hls-cmaf/index.js +6 -5
  106. package/dist/es2015/protocols/hls-cmaf/lexer.js +1 -2
  107. package/dist/es2015/protocols/hls-cmaf/parse.js +65 -18
  108. package/dist/es2015/protocols/hls-cmaf/unavailable.js +5 -5
  109. package/dist/es2015/protocols/hls-live/index.js +5 -5
  110. package/dist/es2015/protocols/hls-ll/index.js +1 -2
  111. package/dist/es2015/protocols/hls-ll/parse.js +2 -3
  112. package/dist/es2015/protocols/live-shared.js +1 -2
  113. package/dist/es2015/stages/abr/index.js +2 -3
  114. package/dist/es2015/stages/abr-cap-size/index.js +1 -2
  115. package/dist/es2015/stages/aes-128/index.js +2 -3
  116. package/dist/es2015/stages/alt-audio/index.js +1 -2
  117. package/dist/es2015/stages/chapters/index.js +3 -4
  118. package/dist/es2015/stages/chapters/parse.js +3 -4
  119. package/dist/es2015/stages/cmaf-timing/index.js +1 -2
  120. package/dist/es2015/stages/cmcd/index.js +1 -2
  121. package/dist/es2015/stages/cmsd/index.js +1 -2
  122. package/dist/es2015/stages/codec-probe/index.js +2 -3
  123. package/dist/es2015/stages/codec-switch/index.js +1 -2
  124. package/dist/es2015/stages/content-steering/index.js +2 -3
  125. package/dist/es2015/stages/drm-shared.js +1 -2
  126. package/dist/es2015/stages/eme-cenc/index.js +1 -2
  127. package/dist/es2015/stages/eme-core/index.js +16 -10
  128. package/dist/es2015/stages/eme-fairplay/index.js +2 -3
  129. package/dist/es2015/stages/forced-subtitles/index.js +1 -2
  130. package/dist/es2015/stages/hdr/index.js +2 -3
  131. package/dist/es2015/stages/live-catchup/index.js +1 -2
  132. package/dist/es2015/stages/meta-id3/index.js +1 -2
  133. package/dist/es2015/stages/mp4-box/index.js +1 -2
  134. package/dist/es2015/stages/nal-scan/index.js +1 -2
  135. package/dist/es2015/stages/pdt/index.js +1 -2
  136. package/dist/es2015/stages/qoe/index.js +2 -3
  137. package/dist/es2015/stages/recovery/index.js +2 -3
  138. package/dist/es2015/stages/rendition-names/index.js +2 -3
  139. package/dist/es2015/stages/text-cea608/decode.js +2 -3
  140. package/dist/es2015/stages/text-cea608/index.js +1 -2
  141. package/dist/es2015/stages/text-cea708/decode.js +3 -4
  142. package/dist/es2015/stages/text-cea708/index.js +2 -3
  143. package/dist/es2015/stages/text-ttml/images.js +1 -2
  144. package/dist/es2015/stages/text-ttml/index.js +2 -3
  145. package/dist/es2015/stages/text-ttml/parse.js +2 -3
  146. package/dist/es2015/stages/text-webvtt/index.js +1 -2
  147. package/dist/es2015/stages/text-webvtt-segmented/index.js +1 -2
  148. package/dist/es2015/stages/thumbnails/index.js +2 -3
  149. package/dist/es2015/stages/timed-metadata/index.js +2 -3
  150. package/dist/es2015/stages/trick-play/index.js +2 -3
  151. package/dist/index.d.ts +1 -1
  152. package/dist/index.d.ts.map +1 -1
  153. package/dist/index.js +1 -1
  154. package/dist/index.js.map +1 -1
  155. package/dist/kernel/characteristics.d.ts +8 -1
  156. package/dist/kernel/characteristics.d.ts.map +1 -1
  157. package/dist/kernel/characteristics.js +23 -0
  158. package/dist/kernel/characteristics.js.map +1 -1
  159. package/dist/kernel/presentation.d.ts +5 -0
  160. package/dist/kernel/presentation.d.ts.map +1 -1
  161. package/dist/kernel/presentation.js +9 -0
  162. package/dist/kernel/presentation.js.map +1 -1
  163. package/dist/kernel/reducer.d.ts.map +1 -1
  164. package/dist/kernel/reducer.js +13 -9
  165. package/dist/kernel/reducer.js.map +1 -1
  166. package/dist/kernel/transport.d.ts +3 -1
  167. package/dist/kernel/transport.d.ts.map +1 -1
  168. package/dist/kernel/transport.js +5 -1
  169. package/dist/kernel/transport.js.map +1 -1
  170. package/dist/protocols/dash-cmaf/index.d.ts.map +1 -1
  171. package/dist/protocols/dash-cmaf/index.js +3 -1
  172. package/dist/protocols/dash-cmaf/index.js.map +1 -1
  173. package/dist/protocols/dash-live/index.d.ts.map +1 -1
  174. package/dist/protocols/dash-live/index.js +3 -1
  175. package/dist/protocols/dash-live/index.js.map +1 -1
  176. package/dist/protocols/hls-cmaf/index.d.ts.map +1 -1
  177. package/dist/protocols/hls-cmaf/index.js +4 -2
  178. package/dist/protocols/hls-cmaf/index.js.map +1 -1
  179. package/dist/protocols/hls-cmaf/parse.d.ts.map +1 -1
  180. package/dist/protocols/hls-cmaf/parse.js +64 -5
  181. package/dist/protocols/hls-cmaf/parse.js.map +1 -1
  182. package/dist/protocols/hls-cmaf/unavailable.d.ts +1 -1
  183. package/dist/protocols/hls-cmaf/unavailable.d.ts.map +1 -1
  184. package/dist/protocols/hls-cmaf/unavailable.js +8 -2
  185. package/dist/protocols/hls-cmaf/unavailable.js.map +1 -1
  186. package/dist/protocols/hls-live/index.d.ts.map +1 -1
  187. package/dist/protocols/hls-live/index.js +4 -2
  188. package/dist/protocols/hls-live/index.js.map +1 -1
  189. package/dist/stages/eme-core/index.d.ts.map +1 -1
  190. package/dist/stages/eme-core/index.js +14 -3
  191. package/dist/stages/eme-core/index.js.map +1 -1
  192. package/dist/types/ir.d.ts +7 -0
  193. package/dist/types/ir.d.ts.map +1 -1
  194. package/dist/types/messages.d.ts +6 -0
  195. package/dist/types/messages.d.ts.map +1 -1
  196. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import { createReducer } from "./reducer.js";
2
2
  import { createStageContext } from "./context.js";
3
3
  import { createPlaybackWatchdog } from "./watchdog.js";
4
- //#region src/kernel/lifecycle.ts
4
+ // src/kernel/lifecycle.ts
5
5
  function snapshot(ranges) {
6
6
  const out = [];
7
7
  for (let i = 0; i < ranges.length; i += 1) out.push({
@@ -124,5 +124,4 @@ function createLifecycle(deps) {
124
124
  slices: () => installed
125
125
  };
126
126
  }
127
- //#endregion
128
127
  export { createLifecycle };
@@ -1,5 +1,5 @@
1
1
  import { cueFormat, isManifestType, normalizeMimeType } from "./mime.js";
2
- //#region src/kernel/loader.ts
2
+ // src/kernel/loader.ts
3
3
  /**
4
4
  * Names the kernel itself provides. A stage's `requires` naming one of
5
5
  * these is always satisfied; everything else must match a composed stage's
@@ -105,5 +105,4 @@ function compose(stages) {
105
105
  manifestTypes
106
106
  };
107
107
  }
108
- //#endregion
109
108
  export { KERNEL_PROVIDES, compose };
@@ -1,4 +1,4 @@
1
- //#region src/kernel/mime.ts
1
+ // src/kernel/mime.ts
2
2
  /**
3
3
  * MIME type normalization, shared by the composition root, the reducer, and
4
4
  * the protocol adapters. A caller's `mimeType` hint and a server's
@@ -31,5 +31,4 @@ function cueFormat(mimeType, codecs) {
31
31
  if (mime !== "application/mp4" || codecs === void 0 || codecs === null) return mime;
32
32
  return `${mime};${codecs.split(".")[0].trim().toLowerCase()}`;
33
33
  }
34
- //#endregion
35
34
  export { cueFormat, isManifestType, normalizeMimeType, typeString };
@@ -1,7 +1,7 @@
1
- import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/objectSpread2.js";
1
+ import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/objectSpread2.js";
2
2
  import { createAppendQueue } from "./append-queue.js";
3
3
  import { createEvictor } from "./evictor.js";
4
- //#region src/kernel/mse.ts
4
+ // src/kernel/mse.ts
5
5
  function managedMediaSource() {
6
6
  return globalThis.ManagedMediaSource;
7
7
  }
@@ -490,5 +490,4 @@ function createMseController(options) {
490
490
  }
491
491
  };
492
492
  }
493
- //#endregion
494
493
  export { createMseController, decodable };
@@ -1,6 +1,6 @@
1
- import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/objectSpread2.js";
2
- import _asyncToGenerator from "../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/asyncToGenerator.js";
3
- //#region src/kernel/prepare.ts
1
+ import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/objectSpread2.js";
2
+ import _asyncToGenerator from "../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/asyncToGenerator.js";
3
+ // src/kernel/prepare.ts
4
4
  /**
5
5
  * The boundary meta a transform and the probe receive. The content type
6
6
  * comes from the buffer the request names, so the preparer needs no
@@ -73,5 +73,4 @@ function createSegmentPreparer(deps) {
73
73
  chains.set(sbId, next);
74
74
  };
75
75
  }
76
- //#endregion
77
76
  export { createSegmentPreparer };
@@ -1,8 +1,17 @@
1
- //#region src/kernel/presentation.ts
1
+ import { videoKind } from "./characteristics.js";
2
+ // src/kernel/presentation.ts
2
3
  /** An I-frame-only video track, kept for trick play and never selected for normal playback. */
3
4
  function isTrick(track) {
4
5
  return track.role === "trick";
5
6
  }
7
+ /**
8
+ * A video track that shows the main picture: its kind is main, or the
9
+ * manifest gives none. Not a sign-language, alternate or commentary version.
10
+ */
11
+ function isMainPicture(track) {
12
+ const kind = videoKind(track);
13
+ return !isTrick(track) && (kind === "main" || kind === "");
14
+ }
6
15
  function findTrackSite(presentation, trackId) {
7
16
  var _presentation$periods;
8
17
  for (const period of (_presentation$periods = presentation === null || presentation === void 0 ? void 0 : presentation.periods) !== null && _presentation$periods !== void 0 ? _presentation$periods : []) for (const track of period.tracks) if (track.id === trackId) return {
@@ -20,5 +29,4 @@ function findRendition(presentation, renditionId) {
20
29
  };
21
30
  return null;
22
31
  }
23
- //#endregion
24
- export { findRendition, findTrackSite, isTrick };
32
+ export { findRendition, findTrackSite, isMainPicture, isTrick };
@@ -1,14 +1,14 @@
1
- import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/objectSpread2.js";
1
+ import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/objectSpread2.js";
2
2
  import { tickAfter } from "./effects.js";
3
3
  import { cueFormat, normalizeMimeType, typeString } from "./mime.js";
4
- import { findRendition, findTrackSite, isTrick } from "./presentation.js";
4
+ import { findRendition, findTrackSite, isMainPicture, isTrick } from "./presentation.js";
5
5
  import { applyRefresh } from "./refresh.js";
6
6
  import { reconciledOffset, segmentAtTime } from "./timeline.js";
7
7
  import { bufferedEndFrom, reachesEnd, schedule } from "./scheduler.js";
8
- import _objectWithoutProperties from "../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/objectWithoutProperties.js";
8
+ import _objectWithoutProperties from "../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/objectWithoutProperties.js";
9
9
  import { activeAudio, audioGroup, audioInGroup, availableGroups, canSwitchTo, codecFamily, createArbiter, planPinApply, withDeadGroups } from "./rendition-select.js";
10
10
  import { sbIdFor } from "./sinks/mse-sink.js";
11
- //#region src/kernel/reducer.ts
11
+ // src/kernel/reducer.ts
12
12
  const _excluded = ["pendingInit"];
13
13
  const _excluded2 = ["repeat"];
14
14
  const _excluded3 = ["appended"];
@@ -681,7 +681,7 @@ function loadPresentation(state, merged, undecodableIds = /* @__PURE__ */ new Se
681
681
  for (const [token, request] of inflight) if (request.trackId === "manifest") inflight.delete(token);
682
682
  const phase = state.lifecycle.phase === "loading" ? "ready" : state.lifecycle.phase;
683
683
  const active = new Map(state.tracks.active);
684
- for (const period of presentation.periods) for (const track of period.tracks) if ((track.contentType === "video" || track.contentType === "audio") && !isTrick(track) && !active.has(track.contentType) && track.renditions.some((r) => !undecodableIds.has(r.id))) active.set(track.contentType, track.id);
684
+ for (const mainOnly of [true, false]) for (const period of presentation.periods) for (const track of period.tracks) if ((track.contentType === "video" || track.contentType === "audio") && !isTrick(track) && !active.has(track.contentType) && !(mainOnly && track.contentType === "video" && !isMainPicture(track)) && track.renditions.some((r) => !undecodableIds.has(r.id))) active.set(track.contentType, track.id);
685
685
  const loaded = _objectSpread2(_objectSpread2({}, state), {}, {
686
686
  lifecycle: { phase },
687
687
  presentation,
@@ -1447,5 +1447,4 @@ function createReducer(slices, config, hooks = {}) {
1447
1447
  return [next, effects];
1448
1448
  };
1449
1449
  }
1450
- //#endregion
1451
1450
  export { DEFAULT_KERNEL_CONFIG, createReducer, initialState, isCommand, isUndecodable, resolveConfig };
@@ -1,5 +1,5 @@
1
- import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/objectSpread2.js";
2
- //#region src/kernel/refresh.ts
1
+ import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/objectSpread2.js";
2
+ // src/kernel/refresh.ts
3
3
  /** The presentation with the refresh merged, or null when it names no rendition the presentation holds. */
4
4
  function applyRefresh(presentation, refresh) {
5
5
  const renditionId = refresh.renditionId;
@@ -31,5 +31,4 @@ function applyRefresh(presentation, refresh) {
31
31
  periods
32
32
  });
33
33
  }
34
- //#endregion
35
34
  export { applyRefresh };
@@ -1,9 +1,9 @@
1
- import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/objectSpread2.js";
1
+ import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/objectSpread2.js";
2
2
  import { findRendition, findTrackSite } from "./presentation.js";
3
3
  import { segmentAtTime } from "./timeline.js";
4
4
  import { bufferedEndFrom } from "./scheduler.js";
5
- import _objectWithoutProperties from "../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/objectWithoutProperties.js";
6
- //#region src/kernel/rendition-select.ts
5
+ import _objectWithoutProperties from "../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/objectWithoutProperties.js";
6
+ // src/kernel/rendition-select.ts
7
7
  const _excluded = [
8
8
  "maxHeight",
9
9
  "maxWidth",
@@ -440,5 +440,4 @@ function planPinApply(input) {
440
440
  tokenSeq: input.tokenSeq
441
441
  };
442
442
  }
443
- //#endregion
444
443
  export { activeAudio, activeRenditions, arbitrate, audioGroup, audioInGroup, availableGroups, canSwitchTo, codecFamily, createArbiter, exclusionsOf, groupOf, ladderNeighbours, planPinApply, withDeadGroups };
@@ -1,6 +1,6 @@
1
- import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/objectSpread2.js";
1
+ import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/objectSpread2.js";
2
2
  import { buildEpochs, epochForSeq, epochKey, isIndexed, segmentAtTime, timestampOffsetFor } from "./timeline.js";
3
- //#region src/kernel/scheduler.ts
3
+ // src/kernel/scheduler.ts
4
4
  const DEFAULT_GAP_TOLERANCE = .25;
5
5
  /**
6
6
  * A playhead this close to the end counts as inside the last segment. No
@@ -150,5 +150,4 @@ function schedule(input) {
150
150
  tokenSeq
151
151
  };
152
152
  }
153
- //#endregion
154
153
  export { END_SLACK, bufferedEndFrom, measuredFrom, reachesEnd, schedule };
@@ -1,6 +1,6 @@
1
1
  import { adoptTextTrack, emptyTextTrack } from "./text-track-sink.js";
2
2
  import { syncNativeTracks } from "./native-sync.js";
3
- //#region src/kernel/sinks/caption-tracks.ts
3
+ // src/kernel/sinks/caption-tracks.ts
4
4
  /** A VTTCue, or null where the browser has none. */
5
5
  function vttCue(start, end, text) {
6
6
  const Ctor = globalThis.VTTCue;
@@ -78,5 +78,4 @@ function inbandCaptions(ctx, mime, prefix) {
78
78
  }
79
79
  };
80
80
  }
81
- //#endregion
82
81
  export { inbandCaptions, vttCue };
@@ -1,7 +1,6 @@
1
1
  import { createCueSink } from "./text-track-sink.js";
2
- //#region src/kernel/sinks/metadata-sink.ts
2
+ // src/kernel/sinks/metadata-sink.ts
3
3
  function createMetadataSink(deps) {
4
4
  return createCueSink("metadata", "metadata", deps);
5
5
  }
6
- //#endregion
7
6
  export { createMetadataSink };
@@ -1,4 +1,4 @@
1
- //#region src/kernel/sinks/mse-sink.ts
1
+ // src/kernel/sinks/mse-sink.ts
2
2
  /** The sbId naming convention: one SourceBuffer per media content type. */
3
3
  function sbIdFor(contentType) {
4
4
  return `sb:${contentType}`;
@@ -27,5 +27,4 @@ function createMseSink(contentType, deps) {
27
27
  }
28
28
  };
29
29
  }
30
- //#endregion
31
30
  export { createMseSink, sbIdFor };
@@ -1,4 +1,4 @@
1
- //#region src/kernel/sinks/native-sync.ts
1
+ // src/kernel/sinks/native-sync.ts
2
2
  /** Starts the sync; returns its teardown. */
3
3
  function syncNativeTracks(ctx, sync) {
4
4
  const activeId = () => ctx.getState().tracks.active.get("text");
@@ -42,5 +42,4 @@ function syncNativeTracks(ctx, sync) {
42
42
  ctx.element.textTracks.removeEventListener("change", onNativeChange);
43
43
  };
44
44
  }
45
- //#endregion
46
45
  export { syncNativeTracks };
@@ -1,7 +1,7 @@
1
1
  import { cueFormat } from "../mime.js";
2
2
  import { createTextTrackSink } from "./text-track-sink.js";
3
3
  import { syncNativeTracks } from "./native-sync.js";
4
- //#region src/kernel/sinks/text-formats.ts
4
+ // src/kernel/sinks/text-formats.ts
5
5
  const shared = /* @__PURE__ */ new WeakMap();
6
6
  /** The cue format of a text track: its MIME type, with the codec family in fMP4. */
7
7
  function trackFormat(track) {
@@ -60,5 +60,4 @@ function joinTextSink(ctx, parsers) {
60
60
  }
61
61
  };
62
62
  }
63
- //#endregion
64
63
  export { joinTextSink, trackFormat };
@@ -1,4 +1,4 @@
1
- //#region src/kernel/sinks/text-track-sink.ts
1
+ // src/kernel/sinks/text-track-sink.ts
2
2
  /**
3
3
  * Applies the WebVTT settings string's known keys onto a native cue
4
4
  * (WebVTT §4.3). `line` and `position` may carry an alignment after a comma;
@@ -175,5 +175,4 @@ function createCueSink(contentType, kind, deps) {
175
175
  function createTextTrackSink(deps) {
176
176
  return createCueSink("text", "subtitles", deps);
177
177
  }
178
- //#endregion
179
178
  export { adoptTextTrack, createCueSink, createTextTrackSink, emptyTextTrack };
@@ -1,5 +1,5 @@
1
- import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/objectSpread2.js";
2
- //#region src/kernel/timeline.ts
1
+ import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/objectSpread2.js";
2
+ // src/kernel/timeline.ts
3
3
  function isIndexed(addressing) {
4
4
  return !Array.isArray(addressing) && addressing.kind === "indexed";
5
5
  }
@@ -148,5 +148,4 @@ function segmentAtTime(addressing, time, periodStart = 0) {
148
148
  }
149
149
  return null;
150
150
  }
151
- //#endregion
152
151
  export { buildEpochs, epochForSeq, epochKey, isIndexed, isUnresolved, reconciledOffset, segmentAt, segmentAtTime, timestampOffsetFor };
@@ -1,4 +1,4 @@
1
- import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/objectSpread2.js";
1
+ import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/objectSpread2.js";
2
2
  function isBytes(value) {
3
3
  return value instanceof ArrayBuffer || ArrayBuffer.isView(value);
4
4
  }
@@ -158,5 +158,4 @@ function replay(entries, reducer, initial) {
158
158
  }
159
159
  return { ok: true };
160
160
  }
161
- //#endregion
162
161
  export { createTraceBuffer, digest, exportTrace, lighten, replay };
@@ -1,7 +1,7 @@
1
1
  import { cueFormat } from "./mime.js";
2
2
  import { findTrackSite, isTrick } from "./presentation.js";
3
3
  import { isUndecodable } from "./reducer.js";
4
- //#region src/kernel/track-registry.ts
4
+ // src/kernel/track-registry.ts
5
5
  /**
6
6
  * Cue tracks need a stage for their format, not only a sink: one text sink
7
7
  * serves every subtitle format, and a WebVTT stage cannot read TTML. In fMP4
@@ -71,5 +71,4 @@ function createTrackRegistry(deps) {
71
71
  }
72
72
  };
73
73
  }
74
- //#endregion
75
74
  export { createTrackRegistry };
@@ -1,6 +1,6 @@
1
- import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/objectSpread2.js";
2
- import _asyncToGenerator from "../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/asyncToGenerator.js";
3
- //#region src/kernel/transport.ts
1
+ import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/objectSpread2.js";
2
+ import _asyncToGenerator from "../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/asyncToGenerator.js";
3
+ // src/kernel/transport.ts
4
4
  const DEFAULT_RETRY_POLICY = {
5
5
  maxAttempts: 3,
6
6
  baseDelayMs: 500,
@@ -167,12 +167,12 @@ function createTransport(options) {
167
167
  var _kept$keepMs, _kept$rtt;
168
168
  const key = primedKey(url, kept.range);
169
169
  primed.delete(key);
170
- primed.set(key, {
170
+ primed.set(key, _objectSpread2({
171
171
  bytes,
172
172
  headers,
173
173
  expires: now() + ((_kept$keepMs = kept.keepMs) !== null && _kept$keepMs !== void 0 ? _kept$keepMs : PRIMED_TTL_MS),
174
174
  rtt: (_kept$rtt = kept.rtt) !== null && _kept$rtt !== void 0 ? _kept$rtt : 0
175
- });
175
+ }, kept.redirected === void 0 ? {} : { redirected: kept.redirected }));
176
176
  let total = 0;
177
177
  for (const entry of primed.values()) total += entry.bytes.byteLength;
178
178
  while (primed.size > 1 && (primed.size > PRIMED_LIMIT || total > PRIMED_BYTES)) {
@@ -290,6 +290,7 @@ function createTransport(options) {
290
290
  return;
291
291
  }
292
292
  const rtt = answer !== null ? answer.rtt : now() - startedAt;
293
+ const redirected = answer !== null ? answer.redirected : response.redirected ? response.url : void 0;
293
294
  notifyResponse({
294
295
  token,
295
296
  url: draft.url,
@@ -326,14 +327,14 @@ function createTransport(options) {
326
327
  if (sink.keepMs !== void 0) prime(effectUrl, bytes, response.headers, _objectSpread2(_objectSpread2({}, range !== void 0 ? { range } : {}), {}, {
327
328
  keepMs: sink.keepMs,
328
329
  rtt
329
- }));
330
+ }, redirected === void 0 ? {} : { redirected }));
330
331
  let transfer = (_streamed$transfer = streamed === null || streamed === void 0 ? void 0 : streamed.transfer) !== null && _streamed$transfer !== void 0 ? _streamed$transfer : void 0;
331
332
  if (transfer === void 0 && request.preload === true && answer === null) transfer = {
332
333
  bytes: size,
333
334
  ms: rtt - wait
334
335
  };
335
336
  const date = head || request.seq < 0 ? Date.parse((_response$headers$get = response.headers.get("date")) !== null && _response$headers$get !== void 0 ? _response$headers$get : "") : NaN;
336
- sink.absorb(_objectSpread2(_objectSpread2(_objectSpread2({
337
+ sink.absorb(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
337
338
  type: "SEGMENT_LOADED",
338
339
  trackId: request.trackId,
339
340
  seq: request.seq,
@@ -341,7 +342,7 @@ function createTransport(options) {
341
342
  bytes,
342
343
  rtt,
343
344
  size
344
- }, transfer !== void 0 ? { transfer } : {}), Number.isFinite(date) ? { serverDate: date / 1e3 } : {}), {}, { wallClock: Date.now() / 1e3 }));
345
+ }, redirected === void 0 ? {} : { url: redirected }), transfer !== void 0 ? { transfer } : {}), Number.isFinite(date) ? { serverDate: date / 1e3 } : {}), {}, { wallClock: Date.now() / 1e3 }));
345
346
  });
346
347
  return function(_x5) {
347
348
  return _ref.apply(this, arguments);
@@ -451,5 +452,4 @@ function createTransport(options) {
451
452
  prime
452
453
  };
453
454
  }
454
- //#endregion
455
455
  export { DEFAULT_RETRY_POLICY, backoffDelayMs, chunkedTransfer, createTransport, fetchWithin };
@@ -1,4 +1,4 @@
1
- //#region src/kernel/url.ts
1
+ // src/kernel/url.ts
2
2
  /** URL resolution shared by the manifest parsers and the stages that read files. */
3
3
  /** A URI made absolute against the document that carried it; an unparsable one stays as written. */
4
4
  function resolveUrl(uri, baseUrl) {
@@ -8,5 +8,4 @@ function resolveUrl(uri, baseUrl) {
8
8
  return uri;
9
9
  }
10
10
  }
11
- //#endregion
12
11
  export { resolveUrl };
@@ -1,4 +1,4 @@
1
- //#region src/kernel/watchdog.ts
1
+ // src/kernel/watchdog.ts
2
2
  function snapshot(el) {
3
3
  const out = [];
4
4
  for (let i = 0; i < el.buffered.length; i += 1) out.push({
@@ -62,5 +62,4 @@ function createPlaybackWatchdog(el, absorb, options = {}, timers = {
62
62
  }, intervalMs);
63
63
  return () => timers.clearInterval(timer);
64
64
  }
65
- //#endregion
66
65
  export { createPlaybackWatchdog };
@@ -1,9 +1,8 @@
1
1
  import { definePreset } from "../define.js";
2
2
  import { base, dashLine } from "../tiers.js";
3
- //#region src/presets/dash/index.ts
3
+ // src/presets/dash/index.ts
4
4
  /**
5
5
  * The `dash` preset: DASH on demand and live, the base.
6
6
  */
7
7
  const preset = definePreset("dash", () => [...dashLine(), ...base()]);
8
- //#endregion
9
8
  export { preset as default };
@@ -1,6 +1,6 @@
1
1
  import { definePreset } from "../define.js";
2
2
  import { base, dashLine, drmTier } from "../tiers.js";
3
- //#region src/presets/dash-drm/index.ts
3
+ // src/presets/dash-drm/index.ts
4
4
  /**
5
5
  * The `dash-drm` preset: `dash` plus the EME stages, for protected DASH.
6
6
  */
@@ -9,5 +9,4 @@ const preset = definePreset("dash-drm", () => [
9
9
  ...base(),
10
10
  ...drmTier()
11
11
  ]);
12
- //#endregion
13
12
  export { preset as default };
@@ -1,6 +1,6 @@
1
1
  import { definePreset } from "../define.js";
2
2
  import { base, dashLlLine, lowLatencyTier } from "../tiers.js";
3
- //#region src/presets/dash-ll/index.ts
3
+ // src/presets/dash-ll/index.ts
4
4
  /**
5
5
  * The `dash-ll` preset: low-latency DASH on demand and live, CMAF segments,
6
6
  * live catch-up, the base. An MPD without low-latency signalling plays as
@@ -11,5 +11,4 @@ const preset = definePreset("dash-ll", () => [
11
11
  ...lowLatencyTier(),
12
12
  ...base()
13
13
  ]);
14
- //#endregion
15
14
  export { preset as default };
@@ -1,7 +1,7 @@
1
- import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/objectSpread2.js";
2
- import _objectWithoutProperties from "../_virtual/_@oxc-project_runtime@0.153.0/helpers/esm/objectWithoutProperties.js";
1
+ import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/objectSpread2.js";
2
+ import _objectWithoutProperties from "../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/objectWithoutProperties.js";
3
3
  import { mattebox } from "../index.js";
4
- //#region src/presets/define.ts
4
+ // src/presets/define.ts
5
5
  const _excluded = ["stages", "without"];
6
6
  /** Applies the merge rule. Exported for tests; presets call it through `stages`. */
7
7
  function mergeStages(defaults, options = {}) {
@@ -41,5 +41,4 @@ function definePreset(presetName, defaults) {
41
41
  stages
42
42
  });
43
43
  }
44
- //#endregion
45
44
  export { definePreset, mergeStages };
@@ -1,6 +1,6 @@
1
1
  import { definePreset } from "../define.js";
2
2
  import { base, dashLine, hlsLine } from "../tiers.js";
3
- //#region src/presets/dual/index.ts
3
+ // src/presets/dual/index.ts
4
4
  /**
5
5
  * The `dual` preset: both protocol lines, CMAF segments, the base. One
6
6
  * engine for a catalogue that mixes HLS and DASH.
@@ -10,5 +10,4 @@ const preset = definePreset("dual", () => [
10
10
  ...dashLine(),
11
11
  ...base()
12
12
  ]);
13
- //#endregion
14
13
  export { preset as default };
@@ -1,6 +1,6 @@
1
1
  import { definePreset } from "../define.js";
2
2
  import { base, dashLine, drmTier, hlsLine } from "../tiers.js";
3
- //#region src/presets/dual-drm/index.ts
3
+ // src/presets/dual-drm/index.ts
4
4
  /**
5
5
  * The `dual-drm` preset: `dual` plus the EME stages.
6
6
  */
@@ -10,5 +10,4 @@ const preset = definePreset("dual-drm", () => [
10
10
  ...base(),
11
11
  ...drmTier()
12
12
  ]);
13
- //#endregion
14
13
  export { preset as default };
@@ -1,6 +1,6 @@
1
1
  import { definePreset } from "../define.js";
2
2
  import { base, dashLlLine, hlsLlLine, lowLatencyTier } from "../tiers.js";
3
- //#region src/presets/dual-ll/index.ts
3
+ // src/presets/dual-ll/index.ts
4
4
  /**
5
5
  * The `dual-ll` preset: low-latency HLS and low-latency DASH, CMAF
6
6
  * segments, live catch-up, the base. One engine for a catalogue that mixes
@@ -12,5 +12,4 @@ const preset = definePreset("dual-ll", () => [
12
12
  ...lowLatencyTier(),
13
13
  ...base()
14
14
  ]);
15
- //#endregion
16
15
  export { preset as default };
@@ -1,6 +1,6 @@
1
1
  import { definePreset } from "../define.js";
2
2
  import { base, dashLine, hlsLine, tsTier } from "../tiers.js";
3
- //#region src/presets/dual-ts/index.ts
3
+ // src/presets/dual-ts/index.ts
4
4
  /**
5
5
  * The `dual-ts` preset: `dual` plus the MPEG-TS family.
6
6
  */
@@ -10,5 +10,4 @@ const preset = definePreset("dual-ts", () => [
10
10
  ...base(),
11
11
  ...tsTier()
12
12
  ]);
13
- //#endregion
14
13
  export { preset as default };
@@ -1,6 +1,6 @@
1
1
  import { definePreset } from "../define.js";
2
2
  import { base, dashLine, drmTier, hlsLine, tsTier } from "../tiers.js";
3
- //#region src/presets/dual-ts-drm/index.ts
3
+ // src/presets/dual-ts-drm/index.ts
4
4
  /**
5
5
  * The `dual-ts-drm` preset: both lines, MPEG-TS, and DRM. Everything a production backend needs; `full` adds only the accessories.
6
6
  */
@@ -11,5 +11,4 @@ const preset = definePreset("dual-ts-drm", () => [
11
11
  ...tsTier(),
12
12
  ...drmTier()
13
13
  ]);
14
- //#endregion
15
14
  export { preset as default };
@@ -10,7 +10,7 @@ import cmsd from "../../stages/cmsd/index.js";
10
10
  import chapters from "../../stages/chapters/index.js";
11
11
  import { definePreset } from "../define.js";
12
12
  import { base, dashLlLine, drmTier, hlsLlLine, lowLatencyTier, tsTier } from "../tiers.js";
13
- //#region src/presets/full/index.ts
13
+ // src/presets/full/index.ts
14
14
  /**
15
15
  * The `full` preset: `dual-ts-drm` with low-latency HLS, low-latency DASH
16
16
  * and live catch-up (`hls-ll` and `dash-ll` in place of the plain lines), plus the accessories: thumbnails (fetches image playlists, so opt-in elsewhere), chapters
@@ -45,5 +45,4 @@ const preset = definePreset("full", () => [
45
45
  cmsd(),
46
46
  renditionNames()
47
47
  ]);
48
- //#endregion
49
48
  export { preset as default };
@@ -1,9 +1,8 @@
1
1
  import { definePreset } from "../define.js";
2
2
  import { base, hlsLine } from "../tiers.js";
3
- //#region src/presets/hls/index.ts
3
+ // src/presets/hls/index.ts
4
4
  /**
5
5
  * The `hls` preset: HLS on demand and live, CMAF segments, the base.
6
6
  */
7
7
  const preset = definePreset("hls", () => [...hlsLine(), ...base()]);
8
- //#endregion
9
8
  export { preset as default };
@@ -1,6 +1,6 @@
1
1
  import { definePreset } from "../define.js";
2
2
  import { base, drmTier, hlsLine } from "../tiers.js";
3
- //#region src/presets/hls-drm/index.ts
3
+ // src/presets/hls-drm/index.ts
4
4
  /**
5
5
  * The `hls-drm` preset: `hls` plus the EME stages, for protected HLS.
6
6
  */
@@ -9,5 +9,4 @@ const preset = definePreset("hls-drm", () => [
9
9
  ...base(),
10
10
  ...drmTier()
11
11
  ]);
12
- //#endregion
13
12
  export { preset as default };
@@ -1,6 +1,6 @@
1
1
  import { definePreset } from "../define.js";
2
2
  import { base, hlsLlLine, lowLatencyTier } from "../tiers.js";
3
- //#region src/presets/hls-ll/index.ts
3
+ // src/presets/hls-ll/index.ts
4
4
  /**
5
5
  * The `hls-ll` preset: low-latency HLS on demand and live, CMAF segments,
6
6
  * live catch-up, the base. A stream without parts plays as in `hls`.
@@ -10,5 +10,4 @@ const preset = definePreset("hls-ll", () => [
10
10
  ...lowLatencyTier(),
11
11
  ...base()
12
12
  ]);
13
- //#endregion
14
13
  export { preset as default };
@@ -1,6 +1,6 @@
1
1
  import { definePreset } from "../define.js";
2
2
  import { base, hlsLine, tsTier } from "../tiers.js";
3
- //#region src/presets/hls-ts/index.ts
3
+ // src/presets/hls-ts/index.ts
4
4
  /**
5
5
  * The `hls-ts` preset: `hls` plus the MPEG-TS family, for a backend that still emits transport streams.
6
6
  */
@@ -9,5 +9,4 @@ const preset = definePreset("hls-ts", () => [
9
9
  ...base(),
10
10
  ...tsTier()
11
11
  ]);
12
- //#endregion
13
12
  export { preset as default };
@@ -1,6 +1,6 @@
1
1
  import { definePreset } from "../define.js";
2
2
  import { base, drmTier, hlsLine, tsTier } from "../tiers.js";
3
- //#region src/presets/hls-ts-drm/index.ts
3
+ // src/presets/hls-ts-drm/index.ts
4
4
  /**
5
5
  * The `hls-ts-drm` preset: `hls-ts` plus the EME stages.
6
6
  */
@@ -10,5 +10,4 @@ const preset = definePreset("hls-ts-drm", () => [
10
10
  ...tsTier(),
11
11
  ...drmTier()
12
12
  ]);
13
- //#endregion
14
13
  export { preset as default };
@@ -1,10 +1,9 @@
1
1
  import { definePreset } from "../define.js";
2
- //#region src/presets/kernel/index.ts
2
+ // src/presets/kernel/index.ts
3
3
  /**
4
4
  * The `kernel` preset: the engine with zero stages. It attaches and manages
5
5
  * buffers but parses nothing; it is the floor the size budget measures and
6
6
  * the base to build a fully custom stack on with `stages`.
7
7
  */
8
8
  const preset = definePreset("kernel", () => []);
9
- //#endregion
10
9
  export { preset as default };