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.
- package/dist/cdn/mattebox.dash-drm.min.js +3 -3
- package/dist/cdn/mattebox.dash-ll.min.js +3 -3
- package/dist/cdn/mattebox.dash.min.js +3 -3
- package/dist/cdn/mattebox.dual-drm.min.js +3 -3
- package/dist/cdn/mattebox.dual-ll.min.js +3 -3
- package/dist/cdn/mattebox.dual-ts-drm.min.js +3 -3
- package/dist/cdn/mattebox.dual-ts.min.js +3 -3
- package/dist/cdn/mattebox.dual.min.js +3 -3
- package/dist/cdn/mattebox.hls-drm.min.js +3 -3
- package/dist/cdn/mattebox.hls-ll.min.js +3 -3
- package/dist/cdn/mattebox.hls-ts-drm.min.js +3 -3
- package/dist/cdn/mattebox.hls-ts.min.js +3 -3
- package/dist/cdn/mattebox.hls.min.js +3 -3
- package/dist/cdn/mattebox.kernel.min.js +1 -1
- package/dist/cdn/mattebox.min.js +6 -6
- package/dist/es2015/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/asyncToGenerator.js +1 -2
- package/dist/es2015/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/defineProperty.js +1 -2
- package/dist/es2015/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/objectSpread2.js +1 -2
- package/dist/es2015/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/objectWithoutProperties.js +1 -2
- package/dist/es2015/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/objectWithoutPropertiesLoose.js +1 -2
- package/dist/es2015/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/toPrimitive.js +1 -2
- package/dist/es2015/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/toPropertyKey.js +1 -2
- package/dist/es2015/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/typeof.js +1 -2
- package/dist/es2015/containers/adts.js +1 -2
- package/dist/es2015/containers/captions.js +1 -2
- package/dist/es2015/containers/codec-probe/index.js +1 -2
- package/dist/es2015/containers/emsg.js +1 -2
- package/dist/es2015/containers/fmp4/fit.js +1 -2
- package/dist/es2015/containers/fmp4/writer.js +1 -2
- package/dist/es2015/containers/id3.js +2 -3
- package/dist/es2015/containers/metadata.js +1 -2
- package/dist/es2015/containers/mp4-box/index.js +1 -2
- package/dist/es2015/containers/packed-audio/index.js +1 -2
- package/dist/es2015/containers/scte35.js +2 -3
- package/dist/es2015/containers/sei.js +1 -2
- package/dist/es2015/containers/ts-transmux/demux.js +1 -2
- package/dist/es2015/containers/ts-transmux/h264.js +2 -3
- package/dist/es2015/containers/ts-transmux/h265.js +2 -3
- package/dist/es2015/containers/ts-transmux/index.js +2 -3
- package/dist/es2015/containers/ts-transmux/runner.js +3 -4
- package/dist/es2015/containers/ts-transmux/serve.js +1 -2
- package/dist/es2015/containers/ts-transmux/sniff.js +0 -1
- package/dist/es2015/containers/ts-transmux/source.js +1 -2
- package/dist/es2015/containers/ts-transmux/transmux.js +2 -3
- package/dist/es2015/containers/ts-transmux/transmux.worker.js +1 -2
- package/dist/es2015/containers/webvtt.js +2 -3
- package/dist/es2015/containers/wvtt.js +2 -3
- package/dist/es2015/eme/index.js +3 -4
- package/dist/es2015/index.js +5 -6
- package/dist/es2015/kernel/append-queue.js +2 -3
- package/dist/es2015/kernel/base64.js +1 -2
- package/dist/es2015/kernel/bus.js +1 -2
- package/dist/es2015/kernel/characteristics.js +20 -3
- package/dist/es2015/kernel/context.js +1 -2
- package/dist/es2015/kernel/dry-run.js +2 -3
- package/dist/es2015/kernel/effects.js +1 -2
- package/dist/es2015/kernel/evictor.js +1 -2
- package/dist/es2015/kernel/lifecycle.js +1 -2
- package/dist/es2015/kernel/loader.js +1 -2
- package/dist/es2015/kernel/mime.js +1 -2
- package/dist/es2015/kernel/mse.js +2 -3
- package/dist/es2015/kernel/prepare.js +3 -4
- package/dist/es2015/kernel/presentation.js +11 -3
- package/dist/es2015/kernel/reducer.js +5 -6
- package/dist/es2015/kernel/refresh.js +2 -3
- package/dist/es2015/kernel/rendition-select.js +3 -4
- package/dist/es2015/kernel/scheduler.js +2 -3
- package/dist/es2015/kernel/sinks/caption-tracks.js +1 -2
- package/dist/es2015/kernel/sinks/metadata-sink.js +1 -2
- package/dist/es2015/kernel/sinks/mse-sink.js +1 -2
- package/dist/es2015/kernel/sinks/native-sync.js +1 -2
- package/dist/es2015/kernel/sinks/text-formats.js +1 -2
- package/dist/es2015/kernel/sinks/text-track-sink.js +1 -2
- package/dist/es2015/kernel/timeline.js +2 -3
- package/dist/es2015/kernel/trace.js +1 -2
- package/dist/es2015/kernel/track-registry.js +1 -2
- package/dist/es2015/kernel/transport.js +9 -9
- package/dist/es2015/kernel/url.js +1 -2
- package/dist/es2015/kernel/watchdog.js +1 -2
- package/dist/es2015/presets/dash/index.js +1 -2
- package/dist/es2015/presets/dash-drm/index.js +1 -2
- package/dist/es2015/presets/dash-ll/index.js +1 -2
- package/dist/es2015/presets/define.js +3 -4
- package/dist/es2015/presets/dual/index.js +1 -2
- package/dist/es2015/presets/dual-drm/index.js +1 -2
- package/dist/es2015/presets/dual-ll/index.js +1 -2
- package/dist/es2015/presets/dual-ts/index.js +1 -2
- package/dist/es2015/presets/dual-ts-drm/index.js +1 -2
- package/dist/es2015/presets/full/index.js +1 -2
- package/dist/es2015/presets/hls/index.js +1 -2
- package/dist/es2015/presets/hls-drm/index.js +1 -2
- package/dist/es2015/presets/hls-ll/index.js +1 -2
- package/dist/es2015/presets/hls-ts/index.js +1 -2
- package/dist/es2015/presets/hls-ts-drm/index.js +1 -2
- package/dist/es2015/presets/kernel/index.js +1 -2
- package/dist/es2015/presets/tiers.js +1 -2
- package/dist/es2015/protocols/adapter-shared.js +1 -2
- package/dist/es2015/protocols/dash-cmaf/index.js +4 -4
- package/dist/es2015/protocols/dash-cmaf/parse.js +2 -3
- package/dist/es2015/protocols/dash-cmaf/periods-runtime.js +2 -3
- package/dist/es2015/protocols/dash-cmaf/periods.js +2 -3
- package/dist/es2015/protocols/dash-live/index.js +5 -4
- package/dist/es2015/protocols/dash-ll/index.js +1 -2
- package/dist/es2015/protocols/dimensions.js +1 -2
- package/dist/es2015/protocols/hls-cmaf/index.js +6 -5
- package/dist/es2015/protocols/hls-cmaf/lexer.js +1 -2
- package/dist/es2015/protocols/hls-cmaf/parse.js +65 -18
- package/dist/es2015/protocols/hls-cmaf/unavailable.js +5 -5
- package/dist/es2015/protocols/hls-live/index.js +5 -5
- package/dist/es2015/protocols/hls-ll/index.js +1 -2
- package/dist/es2015/protocols/hls-ll/parse.js +2 -3
- package/dist/es2015/protocols/live-shared.js +1 -2
- package/dist/es2015/stages/abr/index.js +2 -3
- package/dist/es2015/stages/abr-cap-size/index.js +1 -2
- package/dist/es2015/stages/aes-128/index.js +2 -3
- package/dist/es2015/stages/alt-audio/index.js +1 -2
- package/dist/es2015/stages/chapters/index.js +3 -4
- package/dist/es2015/stages/chapters/parse.js +3 -4
- package/dist/es2015/stages/cmaf-timing/index.js +1 -2
- package/dist/es2015/stages/cmcd/index.js +1 -2
- package/dist/es2015/stages/cmsd/index.js +1 -2
- package/dist/es2015/stages/codec-probe/index.js +2 -3
- package/dist/es2015/stages/codec-switch/index.js +1 -2
- package/dist/es2015/stages/content-steering/index.js +2 -3
- package/dist/es2015/stages/drm-shared.js +1 -2
- package/dist/es2015/stages/eme-cenc/index.js +1 -2
- package/dist/es2015/stages/eme-core/index.js +16 -10
- package/dist/es2015/stages/eme-fairplay/index.js +2 -3
- package/dist/es2015/stages/forced-subtitles/index.js +1 -2
- package/dist/es2015/stages/hdr/index.js +2 -3
- package/dist/es2015/stages/live-catchup/index.js +1 -2
- package/dist/es2015/stages/meta-id3/index.js +1 -2
- package/dist/es2015/stages/mp4-box/index.js +1 -2
- package/dist/es2015/stages/nal-scan/index.js +1 -2
- package/dist/es2015/stages/pdt/index.js +1 -2
- package/dist/es2015/stages/qoe/index.js +2 -3
- package/dist/es2015/stages/recovery/index.js +2 -3
- package/dist/es2015/stages/rendition-names/index.js +2 -3
- package/dist/es2015/stages/text-cea608/decode.js +2 -3
- package/dist/es2015/stages/text-cea608/index.js +1 -2
- package/dist/es2015/stages/text-cea708/decode.js +3 -4
- package/dist/es2015/stages/text-cea708/index.js +2 -3
- package/dist/es2015/stages/text-ttml/images.js +1 -2
- package/dist/es2015/stages/text-ttml/index.js +2 -3
- package/dist/es2015/stages/text-ttml/parse.js +2 -3
- package/dist/es2015/stages/text-webvtt/index.js +1 -2
- package/dist/es2015/stages/text-webvtt-segmented/index.js +1 -2
- package/dist/es2015/stages/thumbnails/index.js +2 -3
- package/dist/es2015/stages/timed-metadata/index.js +2 -3
- package/dist/es2015/stages/trick-play/index.js +2 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/kernel/characteristics.d.ts +8 -1
- package/dist/kernel/characteristics.d.ts.map +1 -1
- package/dist/kernel/characteristics.js +23 -0
- package/dist/kernel/characteristics.js.map +1 -1
- package/dist/kernel/presentation.d.ts +5 -0
- package/dist/kernel/presentation.d.ts.map +1 -1
- package/dist/kernel/presentation.js +9 -0
- package/dist/kernel/presentation.js.map +1 -1
- package/dist/kernel/reducer.d.ts.map +1 -1
- package/dist/kernel/reducer.js +13 -9
- package/dist/kernel/reducer.js.map +1 -1
- package/dist/kernel/transport.d.ts +3 -1
- package/dist/kernel/transport.d.ts.map +1 -1
- package/dist/kernel/transport.js +5 -1
- package/dist/kernel/transport.js.map +1 -1
- package/dist/protocols/dash-cmaf/index.d.ts.map +1 -1
- package/dist/protocols/dash-cmaf/index.js +3 -1
- package/dist/protocols/dash-cmaf/index.js.map +1 -1
- package/dist/protocols/dash-live/index.d.ts.map +1 -1
- package/dist/protocols/dash-live/index.js +3 -1
- package/dist/protocols/dash-live/index.js.map +1 -1
- package/dist/protocols/hls-cmaf/index.d.ts.map +1 -1
- package/dist/protocols/hls-cmaf/index.js +4 -2
- package/dist/protocols/hls-cmaf/index.js.map +1 -1
- package/dist/protocols/hls-cmaf/parse.d.ts.map +1 -1
- package/dist/protocols/hls-cmaf/parse.js +64 -5
- package/dist/protocols/hls-cmaf/parse.js.map +1 -1
- package/dist/protocols/hls-cmaf/unavailable.d.ts +1 -1
- package/dist/protocols/hls-cmaf/unavailable.d.ts.map +1 -1
- package/dist/protocols/hls-cmaf/unavailable.js +8 -2
- package/dist/protocols/hls-cmaf/unavailable.js.map +1 -1
- package/dist/protocols/hls-live/index.d.ts.map +1 -1
- package/dist/protocols/hls-live/index.js +4 -2
- package/dist/protocols/hls-live/index.js.map +1 -1
- package/dist/stages/eme-core/index.d.ts.map +1 -1
- package/dist/stages/eme-core/index.js +14 -3
- package/dist/stages/eme-core/index.js.map +1 -1
- package/dist/types/ir.d.ts +7 -0
- package/dist/types/ir.d.ts.map +1 -1
- package/dist/types/messages.d.ts +6 -0
- package/dist/types/messages.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -27,7 +27,7 @@ import dashLive from "../protocols/dash-live/index.js";
|
|
|
27
27
|
import dashLl from "../protocols/dash-ll/index.js";
|
|
28
28
|
import packedAudio from "../containers/packed-audio/index.js";
|
|
29
29
|
import tsTransmux from "../containers/ts-transmux/index.js";
|
|
30
|
-
|
|
30
|
+
// src/presets/tiers.ts
|
|
31
31
|
/**
|
|
32
32
|
* The building blocks of the preset matrix. Three axes answer a technical
|
|
33
33
|
* requirement, each set by the packaging backend or the rights situation:
|
|
@@ -120,5 +120,4 @@ function drmTier() {
|
|
|
120
120
|
emeFairplay()
|
|
121
121
|
];
|
|
122
122
|
}
|
|
123
|
-
//#endregion
|
|
124
123
|
export { base, dashLine, dashLlLine, drmTier, hlsLine, hlsLlLine, lowLatencyTier, tsTier };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/protocols/adapter-shared.ts
|
|
2
2
|
function manifestError(reason) {
|
|
3
3
|
return {
|
|
4
4
|
category: "manifest",
|
|
@@ -24,5 +24,4 @@ function manifestFact(bytes, url, claims, parse) {
|
|
|
24
24
|
presentation: result.presentation
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
//#endregion
|
|
28
27
|
export { manifestError, manifestFact };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { scheduled, tickAfter } from "../../kernel/effects.js";
|
|
3
3
|
import { normalizeMimeType } from "../../kernel/mime.js";
|
|
4
4
|
import { findRendition } from "../../kernel/presentation.js";
|
|
@@ -7,7 +7,7 @@ import { activeRenditions } from "../../kernel/rendition-select.js";
|
|
|
7
7
|
import { manifestFact } from "../adapter-shared.js";
|
|
8
8
|
import { parse, sidxToSegments } from "./parse.js";
|
|
9
9
|
import { installPeriods } from "./periods-runtime.js";
|
|
10
|
-
|
|
10
|
+
// src/protocols/dash-cmaf/index.ts
|
|
11
11
|
/**
|
|
12
12
|
* The dash-cmaf protocol adapter as a stage. Inert module: exports a
|
|
13
13
|
* factory, registers nothing at import time.
|
|
@@ -129,8 +129,9 @@ const createReduceDash = (retryMs, lowLatency = false) => (slice, msg, kernel) =
|
|
|
129
129
|
if (msg.type === "UNLOAD" || msg.type === "DETACH") return [INITIAL, []];
|
|
130
130
|
if (msg.type === "TICK" && msg.token.startsWith(RETRY_TOKEN)) return retry(state, msg.token.slice(11));
|
|
131
131
|
if (msg.type === "SEGMENT_LOADED" && msg.trackId === "manifest" && state.manifestUrl !== null) {
|
|
132
|
+
var _msg$url;
|
|
132
133
|
let warnings = [];
|
|
133
|
-
const fact = manifestFact(msg.bytes, state.manifestUrl, (text) => claims(state, text), (text, url) => {
|
|
134
|
+
const fact = manifestFact(msg.bytes, (_msg$url = msg.url) !== null && _msg$url !== void 0 ? _msg$url : state.manifestUrl, (text) => claims(state, text), (text, url) => {
|
|
134
135
|
var _result$warnings;
|
|
135
136
|
const result = parse(text, url, lowLatency);
|
|
136
137
|
if (result.presentation !== null) warnings = (_result$warnings = result.warnings) !== null && _result$warnings !== void 0 ? _result$warnings : [];
|
|
@@ -253,5 +254,4 @@ function dashCmaf(options = {}) {
|
|
|
253
254
|
}
|
|
254
255
|
};
|
|
255
256
|
}
|
|
256
|
-
//#endregion
|
|
257
257
|
export { MANIFEST_TYPES, createReduceDash, dashCmaf as default, installDashPeriods };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { findBox, parseSidx } from "../../containers/mp4-box/index.js";
|
|
3
3
|
import { base64ToBytes } from "../../kernel/base64.js";
|
|
4
4
|
import { resolveUrl } from "../../kernel/url.js";
|
|
5
5
|
import { manifestError } from "../adapter-shared.js";
|
|
6
6
|
import { dimensions } from "../dimensions.js";
|
|
7
7
|
import { flattenPeriods } from "./periods.js";
|
|
8
|
-
|
|
8
|
+
// src/protocols/dash-cmaf/parse.ts
|
|
9
9
|
/**
|
|
10
10
|
* MPD into the IR. Pure: no fetching, no state, no side effects. DOMParser
|
|
11
11
|
* carries the XML work at zero bundle cost. URLs are resolved here, against
|
|
@@ -946,5 +946,4 @@ function sidxToSegments(sidxBytes, addressing) {
|
|
|
946
946
|
}
|
|
947
947
|
return segments;
|
|
948
948
|
}
|
|
949
|
-
//#endregion
|
|
950
949
|
export { parse, parseDuration, sidxToSegments };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import _asyncToGenerator from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _asyncToGenerator from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/asyncToGenerator.js";
|
|
2
2
|
import { findRendition } from "../../kernel/presentation.js";
|
|
3
3
|
import { segmentAt } from "../../kernel/timeline.js";
|
|
4
|
-
|
|
4
|
+
// src/protocols/dash-cmaf/periods-runtime.ts
|
|
5
5
|
/**
|
|
6
6
|
* What a flattened multi-period presentation needs at playback time, kept
|
|
7
7
|
* in the dash-cmaf stage so the kernel stays unaware of periods:
|
|
@@ -130,5 +130,4 @@ function installPeriods(ctx, skips) {
|
|
|
130
130
|
]) element.removeEventListener(name, skipPast);
|
|
131
131
|
};
|
|
132
132
|
}
|
|
133
|
-
//#endregion
|
|
134
133
|
export { installPeriods };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { isIndexed, isUnresolved, segmentAt } from "../../kernel/timeline.js";
|
|
3
|
-
|
|
3
|
+
// src/protocols/dash-cmaf/periods.ts
|
|
4
4
|
/**
|
|
5
5
|
* Several DASH Periods as one continuous presentation, the way Shaka
|
|
6
6
|
* Player combines periods. Each logical track keeps one id for the whole
|
|
@@ -174,5 +174,4 @@ function flattenPeriods(periods) {
|
|
|
174
174
|
warnings
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
|
-
//#endregion
|
|
178
177
|
export { flattenPeriods };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { scheduled, tickAfter } from "../../kernel/effects.js";
|
|
3
3
|
import { registerLiveNamespace } from "../live-shared.js";
|
|
4
4
|
import { parse } from "../dash-cmaf/parse.js";
|
|
5
|
-
|
|
5
|
+
// src/protocols/dash-live/index.ts
|
|
6
6
|
/**
|
|
7
7
|
* DASH live: the edge is computed, never read. Wall clock enters only as
|
|
8
8
|
* fields on facts, stamped at the transport and element boundaries; the
|
|
@@ -253,8 +253,10 @@ const createReduceDashLive = (lowLatency = false) => (slice, msg, kernel) => {
|
|
|
253
253
|
}), []];
|
|
254
254
|
}
|
|
255
255
|
if (msg.type === "SEGMENT_LOADED" && msg.trackId === MPD_TOKEN) {
|
|
256
|
+
var _msg$url;
|
|
256
257
|
if (state.manifestUrl === null) return [state, []];
|
|
257
|
-
const
|
|
258
|
+
const base = (_msg$url = msg.url) !== null && _msg$url !== void 0 ? _msg$url : state.manifestUrl;
|
|
259
|
+
const result = parse(new TextDecoder().decode(msg.bytes), base, lowLatency);
|
|
258
260
|
if (result.presentation === null) return reloadFailed(state, kernel.presentation, result.error.code);
|
|
259
261
|
const effects = [];
|
|
260
262
|
const hash = hashOf(msg.bytes);
|
|
@@ -299,5 +301,4 @@ function dashLive() {
|
|
|
299
301
|
}
|
|
300
302
|
};
|
|
301
303
|
}
|
|
302
|
-
//#endregion
|
|
303
304
|
export { createReduceDashLive, dashLive as default };
|
|
@@ -2,7 +2,7 @@ import { completeChunks } from "../../containers/mp4-box/index.js";
|
|
|
2
2
|
import { registerLiveNamespace } from "../live-shared.js";
|
|
3
3
|
import { MANIFEST_TYPES, createReduceDash, installDashPeriods } from "../dash-cmaf/index.js";
|
|
4
4
|
import { createReduceDashLive } from "../dash-live/index.js";
|
|
5
|
-
|
|
5
|
+
// src/protocols/dash-ll/index.ts
|
|
6
6
|
/**
|
|
7
7
|
* Low-latency DASH (DASH-IF IOP low-latency modes, ISO/IEC 23009-1 Annex
|
|
8
8
|
* K): dash-cmaf and dash-live in one stage, reading what a low-latency MPD
|
|
@@ -38,5 +38,4 @@ function dashLl(options = {}) {
|
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
//#endregion
|
|
42
41
|
export { dashLl as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/protocols/dimensions.ts
|
|
2
2
|
/**
|
|
3
3
|
* The `AxB` pair both manifest families write for sizes and grids: HLS
|
|
4
4
|
* RESOLUTION and LAYOUT (RFC 8216 §4.3.4.2, the Roku image-playlist tags),
|
|
@@ -11,5 +11,4 @@ function dimensions(value) {
|
|
|
11
11
|
const b = Number(match === null || match === void 0 ? void 0 : match[2]);
|
|
12
12
|
return a > 0 && b > 0 ? [a, b] : null;
|
|
13
13
|
}
|
|
14
|
-
//#endregion
|
|
15
14
|
export { dimensions };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { scheduled, tickAfter } from "../../kernel/effects.js";
|
|
3
3
|
import { normalizeMimeType } from "../../kernel/mime.js";
|
|
4
4
|
import { activeRenditions } from "../../kernel/rendition-select.js";
|
|
5
5
|
import { manifestFact } from "../adapter-shared.js";
|
|
6
6
|
import { parse, parseMediaPlaylist, refreshFor } from "./parse.js";
|
|
7
7
|
import { LOAD_FAILED, readmitMessage, unavailableMessages } from "./unavailable.js";
|
|
8
|
-
|
|
8
|
+
// src/protocols/hls-cmaf/index.ts
|
|
9
9
|
/**
|
|
10
10
|
* The hls-cmaf protocol adapter as a stage. Inert module: exports a
|
|
11
11
|
* factory, registers nothing at import time.
|
|
@@ -120,18 +120,20 @@ const createReduceHls = (retryMs, parseMedia = parseMediaPlaylist) => (slice, ms
|
|
|
120
120
|
}), []];
|
|
121
121
|
if (msg.type === "UNLOAD" || msg.type === "DETACH") return [INITIAL, []];
|
|
122
122
|
if (msg.type === "SEGMENT_LOADED" && msg.trackId === "manifest" && state.manifestUrl !== null) {
|
|
123
|
-
|
|
123
|
+
var _msg$url;
|
|
124
|
+
const fact = manifestFact(msg.bytes, (_msg$url = msg.url) !== null && _msg$url !== void 0 ? _msg$url : state.manifestUrl, (text) => claims(state, text), (text, url) => parse(text, url, parseMedia));
|
|
124
125
|
return [state, fact === null ? [] : [feed(fact)]];
|
|
125
126
|
}
|
|
126
127
|
if (msg.type === "TICK" && msg.token.startsWith(RETRY_TOKEN)) return retry(state, kernel, msg.token.slice(10));
|
|
127
128
|
let next = state;
|
|
128
129
|
const effects = [];
|
|
129
130
|
if (msg.type === "SEGMENT_LOADED" && msg.trackId in state.pending) {
|
|
131
|
+
var _msg$url2;
|
|
130
132
|
const url = state.pending[msg.trackId];
|
|
131
133
|
const pending = _objectSpread2({}, state.pending);
|
|
132
134
|
delete pending[msg.trackId];
|
|
133
135
|
next = _objectSpread2(_objectSpread2({}, next), {}, { pending });
|
|
134
|
-
const media = parseMedia(new TextDecoder().decode(msg.bytes), url);
|
|
136
|
+
const media = parseMedia(new TextDecoder().decode(msg.bytes), (_msg$url2 = msg.url) !== null && _msg$url2 !== void 0 ? _msg$url2 : url);
|
|
135
137
|
const playlist = media.playlist;
|
|
136
138
|
const error = playlist === null ? media.error : playlist.endlist && playlist.segments.length === 0 ? {
|
|
137
139
|
category: "manifest",
|
|
@@ -201,5 +203,4 @@ function hlsCmaf(options = {}) {
|
|
|
201
203
|
}
|
|
202
204
|
};
|
|
203
205
|
}
|
|
204
|
-
//#endregion
|
|
205
206
|
export { MANIFEST_TYPES, createReduceHls, hlsCmaf as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/protocols/hls-cmaf/lexer.ts
|
|
2
2
|
/** Tags with attribute lists; everything else keeps its raw value. */
|
|
3
3
|
const ATTRIBUTE_TAGS = /* @__PURE__ */ new Set([
|
|
4
4
|
"EXT-X-STREAM-INF",
|
|
@@ -78,5 +78,4 @@ function lex(text) {
|
|
|
78
78
|
}
|
|
79
79
|
return lines;
|
|
80
80
|
}
|
|
81
|
-
//#endregion
|
|
82
81
|
export { lex, parseAttributeList };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { byteToHex } from "../../kernel/base64.js";
|
|
3
3
|
import { resolveUrl } from "../../kernel/url.js";
|
|
4
4
|
import { manifestError } from "../adapter-shared.js";
|
|
5
5
|
import { dimensions } from "../dimensions.js";
|
|
6
6
|
import { lex } from "./lexer.js";
|
|
7
|
-
|
|
7
|
+
// src/protocols/hls-cmaf/parse.ts
|
|
8
8
|
/**
|
|
9
9
|
* m3u8 into the IR. Pure: no fetching, no state, no side effects. URLs are
|
|
10
10
|
* resolved here, against the playlist's own URL, and stored absolute;
|
|
@@ -297,6 +297,20 @@ function mediaContentType(type) {
|
|
|
297
297
|
if (type === "SUBTITLES") return "text";
|
|
298
298
|
return null;
|
|
299
299
|
}
|
|
300
|
+
function videoMembers(entries, groupId) {
|
|
301
|
+
const members = entries.filter((e) => e.type === "VIDEO" && e.groupId === groupId);
|
|
302
|
+
const declared = members.some((e) => e.attributes.DEFAULT === "YES");
|
|
303
|
+
return members.map((entry) => ({
|
|
304
|
+
key: attributeKey(entry.attributes, PER_GROUP),
|
|
305
|
+
entry,
|
|
306
|
+
main: declared ? entry.attributes.DEFAULT === "YES" : entry.uri === null
|
|
307
|
+
}));
|
|
308
|
+
}
|
|
309
|
+
/** What a VIDEO rendition says about its version, as the AUDIO and SUBTITLES ones do. */
|
|
310
|
+
function videoTrackFields({ entry, main }) {
|
|
311
|
+
const characteristics = characteristicsOf(entry);
|
|
312
|
+
return _objectSpread2(_objectSpread2({ name: entry.name }, entry.attributes.LANGUAGE !== void 0 ? { lang: entry.attributes.LANGUAGE } : {}), {}, { role: main ? "main" : "alternate" }, characteristics.length > 0 ? { characteristics } : {});
|
|
313
|
+
}
|
|
300
314
|
/** The attributes as one string, in name order, leaving out the names `skip` matches. */
|
|
301
315
|
function attributeKey(attributes, skip) {
|
|
302
316
|
return Object.keys(attributes).filter((name) => (skip === null || skip === void 0 ? void 0 : skip.test(name)) !== true).sort().map((name) => `${name}=${attributes[name]}`).join(",");
|
|
@@ -535,8 +549,10 @@ function parse(text, baseUrl, parseMedia = parseMediaPlaylist) {
|
|
|
535
549
|
const audioOnlyVariants = [];
|
|
536
550
|
const couplings = [];
|
|
537
551
|
const declared = /* @__PURE__ */ new Map();
|
|
552
|
+
const alternateVideos = /* @__PURE__ */ new Map();
|
|
553
|
+
let mainVideo;
|
|
538
554
|
for (const variant of variants) {
|
|
539
|
-
var _dimensions;
|
|
555
|
+
var _dimensions, _variant$attributes$V;
|
|
540
556
|
const bandwidth = Number(variant.attributes.BANDWIDTH) || 0;
|
|
541
557
|
const [width, height] = (_dimensions = dimensions(variant.attributes.RESOLUTION)) !== null && _dimensions !== void 0 ? _dimensions : [];
|
|
542
558
|
const { video, audio } = splitCodecs(variant.attributes.CODECS);
|
|
@@ -559,31 +575,63 @@ function parse(text, baseUrl, parseMedia = parseMediaPlaylist) {
|
|
|
559
575
|
declared.set(id, variant.attributes);
|
|
560
576
|
const average = Number(variant.attributes["AVERAGE-BANDWIDTH"]);
|
|
561
577
|
const supplemental = variant.attributes["SUPPLEMENTAL-CODECS"];
|
|
562
|
-
|
|
578
|
+
const base = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
|
|
563
579
|
id,
|
|
564
580
|
bitrate: bandwidth,
|
|
565
581
|
codecs,
|
|
566
582
|
mimeType: "video/mp4",
|
|
567
583
|
segments: [],
|
|
568
584
|
playlistUrl: variant.uri
|
|
569
|
-
}, average > 0 ? { averageBitrate: average } : {}), supplemental !== void 0 ? { supplementalCodecs: supplemental } : {}), pathway !== void 0 ? { pathway } : {}), width !== void 0 ? { width } : {}), height !== void 0 ? { height } : {}), Number.isFinite(frameRate) ? { frameRate } : {}), videoRange !== void 0 ? { videoRange } : {})
|
|
585
|
+
}, average > 0 ? { averageBitrate: average } : {}), supplemental !== void 0 ? { supplementalCodecs: supplemental } : {}), pathway !== void 0 ? { pathway } : {}), width !== void 0 ? { width } : {}), height !== void 0 ? { height } : {}), Number.isFinite(frameRate) ? { frameRate } : {}), videoRange !== void 0 ? { videoRange } : {});
|
|
570
586
|
const requires = {};
|
|
571
587
|
if (variant.attributes.AUDIO !== void 0) requires.audio = variant.attributes.AUDIO;
|
|
572
588
|
if (variant.attributes.SUBTITLES !== void 0) requires.text = variant.attributes.SUBTITLES;
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
589
|
+
const members = videoMembers(mediaEntries, (_variant$attributes$V = variant.attributes.VIDEO) !== null && _variant$attributes$V !== void 0 ? _variant$attributes$V : "");
|
|
590
|
+
const versions = members.length > 0 ? members : [null];
|
|
591
|
+
for (const member of versions) {
|
|
592
|
+
var _member$entry$uri;
|
|
593
|
+
const rendition = member === null ? base : _objectSpread2(_objectSpread2({}, base), {}, {
|
|
594
|
+
id: member.main ? id : `${id}:${member.entry.name}`,
|
|
595
|
+
playlistUrl: (_member$entry$uri = member.entry.uri) !== null && _member$entry$uri !== void 0 ? _member$entry$uri : variant.uri
|
|
596
|
+
});
|
|
597
|
+
if (member === null || member.main) {
|
|
598
|
+
var _mainVideo;
|
|
599
|
+
renditions.push(rendition);
|
|
600
|
+
if (member !== null) (_mainVideo = mainVideo) !== null && _mainVideo !== void 0 || (mainVideo = member);
|
|
601
|
+
} else {
|
|
602
|
+
var _alternateVideos$get;
|
|
603
|
+
const version = (_alternateVideos$get = alternateVideos.get(member.key)) !== null && _alternateVideos$get !== void 0 ? _alternateVideos$get : {
|
|
604
|
+
member,
|
|
605
|
+
renditions: []
|
|
606
|
+
};
|
|
607
|
+
version.renditions.push(rendition);
|
|
608
|
+
alternateVideos.set(member.key, version);
|
|
609
|
+
}
|
|
610
|
+
if (Object.keys(requires).length > 0) couplings.push({
|
|
611
|
+
renditionId: rendition.id,
|
|
612
|
+
requires
|
|
613
|
+
});
|
|
614
|
+
}
|
|
577
615
|
}
|
|
578
616
|
const tracks = [];
|
|
579
|
-
if (renditions.length > 0)
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
617
|
+
if (renditions.length > 0) {
|
|
618
|
+
tracks.push(_objectSpread2(_objectSpread2({
|
|
619
|
+
id: "video-main",
|
|
620
|
+
contentType: "video",
|
|
621
|
+
mimeType: "video/mp4"
|
|
622
|
+
}, mainVideo !== void 0 ? videoTrackFields(mainVideo) : {}), {}, {
|
|
623
|
+
protection: sessionProtection,
|
|
624
|
+
renditions
|
|
625
|
+
}));
|
|
626
|
+
for (const { member, renditions: versionRenditions } of alternateVideos.values()) tracks.push(_objectSpread2(_objectSpread2({
|
|
627
|
+
id: `video:${member.entry.name}`,
|
|
628
|
+
contentType: "video",
|
|
629
|
+
mimeType: "video/mp4"
|
|
630
|
+
}, videoTrackFields(member)), {}, {
|
|
631
|
+
protection: sessionProtection,
|
|
632
|
+
renditions: versionRenditions
|
|
633
|
+
}));
|
|
634
|
+
} else if (audioOnlyVariants.length > 0) {
|
|
587
635
|
const audioRenditions = [];
|
|
588
636
|
for (const variant of audioOnlyVariants) {
|
|
589
637
|
const bandwidth = Number(variant.attributes.BANDWIDTH) || 0;
|
|
@@ -733,5 +781,4 @@ function refreshFor(presentation, renditionId, playlist) {
|
|
|
733
781
|
function shiftRange(range, shift) {
|
|
734
782
|
return _objectSpread2(_objectSpread2(_objectSpread2({}, range), {}, { start: range.start + shift }, range.end !== void 0 ? { end: range.end + shift } : {}), range.plannedEnd !== void 0 ? { plannedEnd: range.plannedEnd + shift } : {});
|
|
735
783
|
}
|
|
736
|
-
//#endregion
|
|
737
784
|
export { normalizeAvcCodec, parse, parseByteRange, parseMediaLines, parseMediaPlaylist, refreshFor };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { isTrick } from "../../kernel/presentation.js";
|
|
3
3
|
import { withDeadGroups } from "../../kernel/rendition-select.js";
|
|
4
|
-
|
|
4
|
+
// src/protocols/hls-cmaf/unavailable.ts
|
|
5
5
|
/**
|
|
6
6
|
* What a playlist that cannot be used means for playback. Pure; shared by
|
|
7
7
|
* hls-cmaf (a playlist that fails to load) and hls-live (a playlist that
|
|
@@ -36,7 +36,7 @@ function exclusion(presentation, kernel, source, ids) {
|
|
|
36
36
|
* `source` excludes. A failed audio group takes the variants that require
|
|
37
37
|
* it, so arbitration moves to a variant on a working group and alt-audio
|
|
38
38
|
* follows. A CONSTRAIN when playback can go on; a fatal MANIFEST_FAILED
|
|
39
|
-
* when
|
|
39
|
+
* when the active video track has no rendition left, or when the active audio track
|
|
40
40
|
* has none and no variant names an audio group to move to.
|
|
41
41
|
*/
|
|
42
42
|
function unavailableMessages(kernel, source, ids, error) {
|
|
@@ -45,7 +45,8 @@ function unavailableMessages(kernel, source, ids, error) {
|
|
|
45
45
|
const { excluded, own } = exclusion(presentation, kernel, source, ids);
|
|
46
46
|
const grouped = presentation.couplings.some((c) => c.requires.audio !== void 0);
|
|
47
47
|
const activeAudio = kernel.tracks.active.get("audio");
|
|
48
|
-
|
|
48
|
+
const activeVideo = kernel.tracks.active.get("video");
|
|
49
|
+
if (presentation.periods.some((period) => period.tracks.some((track) => track.renditions.length > 0 && track.renditions.every((r) => excluded.has(r.id)) && (track.contentType === "video" && !isTrick(track) && (activeVideo === void 0 || track.id === activeVideo) || track.id === activeAudio && !grouped)))) return [{
|
|
49
50
|
type: "MANIFEST_FAILED",
|
|
50
51
|
error: _objectSpread2(_objectSpread2({}, error), {}, { fatal: true })
|
|
51
52
|
}];
|
|
@@ -70,5 +71,4 @@ function readmitMessage(kernel, source, ids) {
|
|
|
70
71
|
constraint: { excludeIds: [...own] }
|
|
71
72
|
};
|
|
72
73
|
}
|
|
73
|
-
//#endregion
|
|
74
74
|
export { LOAD_FAILED, RELOAD_FAILED, readmitMessage, unavailableMessages };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { scheduled, tickAfter } from "../../kernel/effects.js";
|
|
3
3
|
import { findRendition } from "../../kernel/presentation.js";
|
|
4
4
|
import { activeRenditions } from "../../kernel/rendition-select.js";
|
|
5
5
|
import { parseMediaPlaylist, refreshFor } from "../hls-cmaf/parse.js";
|
|
6
6
|
import { RELOAD_FAILED, readmitMessage, unavailableMessages } from "../hls-cmaf/unavailable.js";
|
|
7
7
|
import { registerLiveNamespace } from "../live-shared.js";
|
|
8
|
-
|
|
8
|
+
// src/protocols/hls-live/index.ts
|
|
9
9
|
/**
|
|
10
10
|
* HLS live: the edge is read, never computed. A slice reducer reloads the
|
|
11
11
|
* active playlists on the TARGETDURATION cadence, reconciles the sliding
|
|
@@ -421,7 +421,7 @@ const createReduceHlsLive = (retryMs, ll) => (slice, msg, kernel) => {
|
|
|
421
421
|
return reloadFailed(state, kernel, renditionId, msg.error, retryMs);
|
|
422
422
|
}
|
|
423
423
|
if (msg.type === "SEGMENT_LOADED") {
|
|
424
|
-
var _site$rendition$segme, _site$rendition$dateR, _media$playlist$skipp, _findRendition4, _lastSegment$seq;
|
|
424
|
+
var _msg$url, _site$rendition$segme, _site$rendition$dateR, _media$playlist$skipp, _findRendition4, _lastSegment$seq;
|
|
425
425
|
const renditionId = renditionOfToken(msg.trackId);
|
|
426
426
|
if (renditionId === null || kernel.presentation === null) return [state, []];
|
|
427
427
|
const isTarget = state.target !== null && renditionId === state.target.renditionId;
|
|
@@ -429,7 +429,8 @@ const createReduceHlsLive = (retryMs, ll) => (slice, msg, kernel) => {
|
|
|
429
429
|
if (url === null) return [state, []];
|
|
430
430
|
const text = new TextDecoder().decode(msg.bytes);
|
|
431
431
|
const site = findRendition(kernel.presentation, renditionId);
|
|
432
|
-
const
|
|
432
|
+
const base = (_msg$url = msg.url) !== null && _msg$url !== void 0 ? _msg$url : url;
|
|
433
|
+
const media = ll === void 0 ? parseMediaPlaylist(text, base) : ll.parse(text, base, (_site$rendition$segme = site === null || site === void 0 ? void 0 : site.rendition.segments) !== null && _site$rendition$segme !== void 0 ? _site$rendition$segme : [], (_site$rendition$dateR = site === null || site === void 0 ? void 0 : site.rendition.dateRanges) !== null && _site$rendition$dateR !== void 0 ? _site$rendition$dateR : []);
|
|
433
434
|
if (media.playlist === null) return reloadFailed(state, kernel, renditionId, media.error, retryMs);
|
|
434
435
|
const chained = state.chained.filter((id) => id !== renditionId);
|
|
435
436
|
if (ll !== void 0 && ((_media$playlist$skipp = media.playlist.skipped) !== null && _media$playlist$skipp !== void 0 ? _media$playlist$skipp : 0) > 0) {
|
|
@@ -507,5 +508,4 @@ function hlsLive(options = {}) {
|
|
|
507
508
|
}
|
|
508
509
|
};
|
|
509
510
|
}
|
|
510
|
-
//#endregion
|
|
511
511
|
export { createReduceHlsLive, hlsLive as default };
|
|
@@ -2,7 +2,7 @@ import { MANIFEST_TYPES, createReduceHls } from "../hls-cmaf/index.js";
|
|
|
2
2
|
import { registerLiveNamespace } from "../live-shared.js";
|
|
3
3
|
import { createReduceHlsLive } from "../hls-live/index.js";
|
|
4
4
|
import { nextReload, parseLowLatency, reportsOf } from "./parse.js";
|
|
5
|
-
|
|
5
|
+
// src/protocols/hls-ll/index.ts
|
|
6
6
|
/** The stage factory. It provides `hls-cmaf` and `hls-live`, so stages that require either compose with it. */
|
|
7
7
|
function hlsLl(options = {}) {
|
|
8
8
|
var _options$unavailableR;
|
|
@@ -26,5 +26,4 @@ function hlsLl(options = {}) {
|
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
//#endregion
|
|
30
29
|
export { hlsLl as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { resolveUrl } from "../../kernel/url.js";
|
|
3
3
|
import { manifestError } from "../adapter-shared.js";
|
|
4
4
|
import { lex } from "../hls-cmaf/lexer.js";
|
|
5
5
|
import { parseByteRange, parseMediaLines } from "../hls-cmaf/parse.js";
|
|
6
|
-
|
|
6
|
+
// src/protocols/hls-ll/parse.ts
|
|
7
7
|
/**
|
|
8
8
|
* Low-latency HLS media playlists (RFC 8216bis §4.4.3.7, §4.4.3.8,
|
|
9
9
|
* §4.4.4.9, §4.4.5.2 to §4.4.5.4). The base parser reads the segments; this
|
|
@@ -236,5 +236,4 @@ function reportsOf(playlist) {
|
|
|
236
236
|
var _reports;
|
|
237
237
|
return (_reports = playlist.reports) !== null && _reports !== void 0 ? _reports : {};
|
|
238
238
|
}
|
|
239
|
-
//#endregion
|
|
240
239
|
export { nextReload, parseLowLatency, reportsOf, withDirectives };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/protocols/live-shared.ts
|
|
2
2
|
/** How far behind the edge still counts as at it, in seconds. */
|
|
3
3
|
const AT_EDGE_SLACK = 2;
|
|
4
4
|
function registerLiveNamespace(ctx) {
|
|
@@ -25,5 +25,4 @@ function registerLiveNamespace(ctx) {
|
|
|
25
25
|
ctx.registerNamespace("live", api);
|
|
26
26
|
} catch (_unused) {}
|
|
27
27
|
}
|
|
28
|
-
//#endregion
|
|
29
28
|
export { registerLiveNamespace };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { scheduled } from "../../kernel/effects.js";
|
|
3
3
|
import { findRendition, isTrick } from "../../kernel/presentation.js";
|
|
4
4
|
import { canSwitchTo } from "../../kernel/rendition-select.js";
|
|
5
|
-
|
|
5
|
+
// src/stages/abr/index.ts
|
|
6
6
|
/**
|
|
7
7
|
* Adaptive bitrate as a stage, not kernel. It registers one chooser
|
|
8
8
|
* consulted at arbitration step 5 and one constraint source for
|
|
@@ -140,5 +140,4 @@ function abr(options) {
|
|
|
140
140
|
}
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
|
-
//#endregion
|
|
144
143
|
export { abr as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import _asyncToGenerator from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _asyncToGenerator from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/asyncToGenerator.js";
|
|
2
2
|
import { findRendition } from "../../kernel/presentation.js";
|
|
3
|
-
|
|
3
|
+
// src/stages/aes-128/index.ts
|
|
4
4
|
/**
|
|
5
5
|
* aes-128 as a stage: full-segment AES-CBC decryption for HLS EXT-X-KEY
|
|
6
6
|
* METHOD=AES-128 (RFC 8216 §4.3.2.4). One transform step, ordered ahead of
|
|
@@ -79,5 +79,4 @@ function aes128() {
|
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
|
-
//#endregion
|
|
83
82
|
export { aes128 as default, ivFor };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { scheduled } from "../../kernel/effects.js";
|
|
2
2
|
import { groupOf } from "../../kernel/rendition-select.js";
|
|
3
|
-
|
|
3
|
+
// src/stages/alt-audio/index.ts
|
|
4
4
|
/**
|
|
5
5
|
* Alternate audio: a second media pipeline on sb:audio. The kernel already
|
|
6
6
|
* schedules audio tracks generically, so this stage owns selection and
|
|
@@ -111,5 +111,4 @@ function altAudio() {
|
|
|
111
111
|
}
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
|
-
//#endregion
|
|
115
114
|
export { altAudio as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import _asyncToGenerator from "../../_virtual/_@oxc-project_runtime@0.
|
|
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
3
|
import { findTrackSite } from "../../kernel/presentation.js";
|
|
4
4
|
import { chaptersFromInput, parseAppleChapters, parseChapterTrack } from "./parse.js";
|
|
5
|
-
|
|
5
|
+
// src/stages/chapters/index.ts
|
|
6
6
|
/**
|
|
7
7
|
* Chapters: named spans of the presentation, answered through
|
|
8
8
|
* `engine.chapters`. Two sources fill it:
|
|
@@ -166,5 +166,4 @@ function chapters() {
|
|
|
166
166
|
}
|
|
167
167
|
};
|
|
168
168
|
}
|
|
169
|
-
//#endregion
|
|
170
169
|
export { chapters as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import _objectWithoutProperties from "../../_virtual/_@oxc-project_runtime@0.
|
|
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 { parseVtt } from "../../containers/webvtt.js";
|
|
4
4
|
import { resolveUrl } from "../../kernel/url.js";
|
|
5
|
-
|
|
5
|
+
// src/stages/chapters/parse.ts
|
|
6
6
|
/**
|
|
7
7
|
* Chapter files into one record shape. Pure. A WebVTT file serves two
|
|
8
8
|
* sources: a chapters track, whose cue payload is the title, and the
|
|
@@ -172,5 +172,4 @@ function chaptersFromInput(inputs) {
|
|
|
172
172
|
warnings
|
|
173
173
|
};
|
|
174
174
|
}
|
|
175
|
-
//#endregion
|
|
176
175
|
export { chaptersFromInput, orderChapters, parseAppleChapters, parseChapterTrack };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { earliestDecodeTime, findBox, trackTimescales } from "../../containers/mp4-box/index.js";
|
|
2
|
-
|
|
2
|
+
// src/stages/cmaf-timing/index.ts
|
|
3
3
|
/**
|
|
4
4
|
* cmaf-timing reads where a native fMP4 segment's media clock starts, so
|
|
5
5
|
* the kernel can land the segment at the presentation time the manifest
|
|
@@ -36,5 +36,4 @@ function cmafTiming() {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
-
//#endregion
|
|
40
39
|
export { cmafTiming as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { findRendition } from "../../kernel/presentation.js";
|
|
2
2
|
import { segmentAt } from "../../kernel/timeline.js";
|
|
3
3
|
import { bytesToHex } from "../../kernel/base64.js";
|
|
4
|
-
|
|
4
|
+
// src/stages/cmcd/index.ts
|
|
5
5
|
/**
|
|
6
6
|
* Common Media Client Data (CTA-5004). The engine already exposes the seam
|
|
7
7
|
* this needs: a request hook that sees every outgoing segment and manifest
|
|
@@ -122,5 +122,4 @@ function bufferAhead(el) {
|
|
|
122
122
|
for (let i = 0; i < buffered.length; i += 1) if (buffered.start(i) <= currentTime && currentTime <= buffered.end(i)) return buffered.end(i) - currentTime;
|
|
123
123
|
return null;
|
|
124
124
|
}
|
|
125
|
-
//#endregion
|
|
126
125
|
export { cmcd as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/stages/cmsd/index.ts
|
|
2
2
|
/** Splits on commas or semicolons outside double quotes. */
|
|
3
3
|
function split(value, separator) {
|
|
4
4
|
const parts = [];
|
|
@@ -68,5 +68,4 @@ function cmsd() {
|
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
|
-
//#endregion
|
|
72
71
|
export { cmsdParams, cmsd as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { findRendition } from "../../kernel/presentation.js";
|
|
3
3
|
import { codecMismatch, probeInitSegment } from "../../containers/codec-probe/index.js";
|
|
4
|
-
|
|
4
|
+
// src/stages/codec-probe/index.ts
|
|
5
5
|
/**
|
|
6
6
|
* codec-probe as a loadable stage. The derivation itself lives in the
|
|
7
7
|
* container layer (probeInitSegment reads the stsd sample entries and rebuilds
|
|
@@ -86,5 +86,4 @@ function codecProbe() {
|
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
|
-
//#endregion
|
|
90
89
|
export { codecProbe as default };
|