rx-player 4.2.0-dev.2024090600 → 4.2.0-dev.2024091600
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/CHANGELOG.md +14 -7
- package/VERSION +1 -1
- package/dist/commonjs/__GENERATED_CODE/embedded_dash_wasm.d.ts.map +1 -1
- package/dist/commonjs/__GENERATED_CODE/embedded_dash_wasm.js +1 -1
- package/dist/commonjs/__GENERATED_CODE/embedded_worker.d.ts.map +1 -1
- package/dist/commonjs/__GENERATED_CODE/embedded_worker.js +1 -1
- package/dist/commonjs/core/cmcd/cmcd_data_builder.d.ts +12 -0
- package/dist/commonjs/core/cmcd/cmcd_data_builder.d.ts.map +1 -1
- package/dist/commonjs/core/cmcd/cmcd_data_builder.js +27 -1
- package/dist/commonjs/core/fetchers/segment/segment_fetcher.d.ts +24 -0
- package/dist/commonjs/core/fetchers/segment/segment_fetcher.d.ts.map +1 -1
- package/dist/commonjs/core/fetchers/segment/segment_queue.d.ts.map +1 -1
- package/dist/commonjs/core/fetchers/segment/segment_queue.js +8 -7
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.d.ts.map +1 -1
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.js +2 -2
- package/dist/commonjs/main_thread/api/public_api.js +2 -2
- package/dist/commonjs/parsers/manifest/dash/common/parse_mpd.js +2 -2
- package/dist/commonjs/parsers/manifest/dash/common/resolve_base_urls.js +2 -2
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/AdaptationSet.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/AdaptationSet.js +6 -5
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/Label.d.ts +4 -0
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/Label.d.ts.map +1 -0
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/generators/Label.js +12 -0
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/types.d.ts +2 -1
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/types.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/metaplaylist/metaplaylist_parser.js +2 -2
- package/dist/commonjs/parsers/manifest/smooth/create_parser.js +2 -2
- package/dist/commonjs/transports/dash/construct_segment_url.js +2 -2
- package/dist/commonjs/transports/smooth/utils.js +2 -2
- package/dist/commonjs/utils/{resolve_url.d.ts → url-utils.d.ts} +15 -4
- package/dist/commonjs/utils/url-utils.d.ts.map +1 -0
- package/dist/commonjs/utils/{resolve_url.js → url-utils.js} +71 -2
- package/dist/es2017/__GENERATED_CODE/embedded_dash_wasm.d.ts.map +1 -1
- package/dist/es2017/__GENERATED_CODE/embedded_dash_wasm.js +1 -1
- package/dist/es2017/__GENERATED_CODE/embedded_worker.d.ts.map +1 -1
- package/dist/es2017/__GENERATED_CODE/embedded_worker.js +1 -1
- package/dist/es2017/core/cmcd/cmcd_data_builder.d.ts +12 -0
- package/dist/es2017/core/cmcd/cmcd_data_builder.d.ts.map +1 -1
- package/dist/es2017/core/cmcd/cmcd_data_builder.js +27 -1
- package/dist/es2017/core/fetchers/segment/segment_fetcher.d.ts +24 -0
- package/dist/es2017/core/fetchers/segment/segment_fetcher.d.ts.map +1 -1
- package/dist/es2017/core/fetchers/segment/segment_queue.d.ts.map +1 -1
- package/dist/es2017/core/fetchers/segment/segment_queue.js +8 -7
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.d.ts.map +1 -1
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.js +2 -2
- package/dist/es2017/main_thread/api/public_api.js +2 -2
- package/dist/es2017/parsers/manifest/dash/common/parse_mpd.js +1 -1
- package/dist/es2017/parsers/manifest/dash/common/resolve_base_urls.js +1 -1
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/AdaptationSet.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/AdaptationSet.js +6 -5
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/Label.d.ts +4 -0
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/Label.d.ts.map +1 -0
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/generators/Label.js +9 -0
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/types.d.ts +2 -1
- package/dist/es2017/parsers/manifest/dash/wasm-parser/ts/types.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/metaplaylist/metaplaylist_parser.js +1 -1
- package/dist/es2017/parsers/manifest/smooth/create_parser.js +1 -1
- package/dist/es2017/transports/dash/construct_segment_url.js +1 -1
- package/dist/es2017/transports/smooth/utils.js +1 -1
- package/dist/es2017/utils/{resolve_url.d.ts → url-utils.d.ts} +15 -4
- package/dist/es2017/utils/url-utils.d.ts.map +1 -0
- package/dist/es2017/utils/{resolve_url.js → url-utils.js} +71 -3
- package/dist/mpd-parser.wasm +0 -0
- package/dist/rx-player.js +245 -175
- package/dist/rx-player.min.js +15 -15
- package/dist/worker.js +8 -8
- package/package.json +5 -5
- package/src/__GENERATED_CODE/embedded_dash_wasm.ts +1 -1
- package/src/__GENERATED_CODE/embedded_worker.ts +1 -1
- package/src/core/cmcd/cmcd_data_builder.ts +68 -2
- package/src/core/fetchers/segment/segment_fetcher.ts +24 -0
- package/src/core/fetchers/segment/segment_queue.ts +11 -9
- package/src/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.ts +8 -2
- package/src/main_thread/api/public_api.ts +2 -2
- package/src/parsers/manifest/dash/common/parse_mpd.ts +1 -1
- package/src/parsers/manifest/dash/common/resolve_base_urls.ts +1 -1
- package/src/parsers/manifest/dash/wasm-parser/rs/events.rs +3 -2
- package/src/parsers/manifest/dash/wasm-parser/rs/processor/mod.rs +6 -2
- package/src/parsers/manifest/dash/wasm-parser/ts/generators/AdaptationSet.ts +10 -5
- package/src/parsers/manifest/dash/wasm-parser/ts/generators/Label.ts +16 -0
- package/src/parsers/manifest/dash/wasm-parser/ts/types.ts +3 -0
- package/src/parsers/manifest/metaplaylist/metaplaylist_parser.ts +1 -1
- package/src/parsers/manifest/smooth/create_parser.ts +1 -1
- package/src/transports/dash/construct_segment_url.ts +1 -1
- package/src/transports/smooth/utils.ts +1 -1
- package/src/utils/__tests__/{resolve_url.test.ts → url-utils.test.ts} +148 -1
- package/src/utils/{resolve_url.ts → url-utils.ts} +83 -5
- package/dist/commonjs/utils/resolve_url.d.ts.map +0 -1
- package/dist/es2017/utils/resolve_url.d.ts.map +0 -1
|
@@ -17,6 +17,18 @@ export interface ICmcdSegmentInfo {
|
|
|
17
17
|
representation: IRepresentation;
|
|
18
18
|
/** Segment metadata linked to the wanted segment. */
|
|
19
19
|
segment: ISegment;
|
|
20
|
+
/**
|
|
21
|
+
* Optional next segment that may be requested after this one.
|
|
22
|
+
* Should only be set (to something else than `undefined`) if that following
|
|
23
|
+
* segment is part of the same `Representation`.
|
|
24
|
+
*
|
|
25
|
+
* This information is used to produce the "next object request" and "next
|
|
26
|
+
* range request" part of the CMCD payload, used for segment prefetching.
|
|
27
|
+
*
|
|
28
|
+
* If `null` no segment will be requested next for now.
|
|
29
|
+
* If `undefined` we do not know which next segment will be requested.
|
|
30
|
+
*/
|
|
31
|
+
nextSegment: ISegment | null | undefined;
|
|
20
32
|
}
|
|
21
33
|
/**
|
|
22
34
|
* Media playback observation's properties the `CmcdDataBuilder` wants to have
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmcd_data_builder.d.ts","sourceRoot":"","sources":["../../../../src/core/cmcd/cmcd_data_builder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EACT,OAAO,EACP,eAAe,EACf,QAAQ,EACT,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EACV,yBAAyB,EACzB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,K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AAO,OAAO,eAAe;IAClC,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,eAAe,CAAiB;IACxC,OAAO,CAAC,eAAe,CAAkD;IACzE,OAAO,CAAC,iBAAiB,CAAwE;IACjG,OAAO,CAAC,uBAAuB,CAAU;IACzC,OAAO,CAAC,UAAU,CAAuB;IAEzC;;;;OAIG;gBACS,OAAO,EAAE,YAAY;IAajC;;;;;;;;;OASG;IACI,uBAAuB,CAC5B,gBAAgB,EAAE,yBAAyB,CAAC,mCAAmC,CAAC,GAC/E,IAAI;IAcP;;;OAGG;IACI,sBAAsB,IAAI,IAAI;IAMrC;;;;;;OAMG;IACI,gBAAgB,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,GAAG,SAAS;IAI7E;;;;;OAKG;IACH,OAAO,CAAC,kBAAkB;IAuB1B;;;;;OAKG;IACI,sBAAsB,CAAC,aAAa,EAAE,MAAM,GAAG,YAAY;IAoBlE;;;;;OAKG;IACI,4BAA4B,CAAC,OAAO,EAAE,gBAAgB,GAAG,YAAY;IAyH5E;;;;;OAKG;IACH,OAAO,CAAC,eAAe;CAoHxB"}
|
|
@@ -2,6 +2,7 @@ import log from "../../log";
|
|
|
2
2
|
import createUuid from "../../utils/create_uuid";
|
|
3
3
|
import isNullOrUndefined from "../../utils/is_null_or_undefined";
|
|
4
4
|
import TaskCanceller from "../../utils/task_canceller";
|
|
5
|
+
import { getRelativeUrl } from "../../utils/url-utils";
|
|
5
6
|
/**
|
|
6
7
|
* `rtp`, for "REQUESTED_MAXIMUM_THROUGHPUT", indicates the maximum throughput
|
|
7
8
|
* needed to load a given segment without experience degration.
|
|
@@ -141,7 +142,6 @@ export default class CmcdDataBuilder {
|
|
|
141
142
|
const props = this._getCommonCmcdData(this._lastThroughput[content.adaptation.type]);
|
|
142
143
|
props.br = Math.round(content.representation.bitrate / 1000);
|
|
143
144
|
props.d = Math.round(content.segment.duration * 1000);
|
|
144
|
-
// TODO nor (next object request) and nrr (next range request)
|
|
145
145
|
switch (content.adaptation.type) {
|
|
146
146
|
case "video":
|
|
147
147
|
props.ot = "v";
|
|
@@ -156,6 +156,30 @@ export default class CmcdDataBuilder {
|
|
|
156
156
|
if (content.segment.isInit) {
|
|
157
157
|
props.ot = "i";
|
|
158
158
|
}
|
|
159
|
+
if (!isNullOrUndefined(content.nextSegment) &&
|
|
160
|
+
content.segment.url !== null &&
|
|
161
|
+
content.nextSegment.url !== null) {
|
|
162
|
+
// We add a special case for some initialization segment which need
|
|
163
|
+
// multiple byte-ranges to fully request, as the `CmcdDataBuilder`
|
|
164
|
+
// is not supposed to keep track of how the requesting part of the
|
|
165
|
+
// RxPlayer actually perform its multi-byte-range requests
|
|
166
|
+
if (!content.nextSegment.isInit || content.nextSegment.indexRange === undefined) {
|
|
167
|
+
const currSegmentUrl = content.segment.url;
|
|
168
|
+
const nextSegmentUrl = content.nextSegment.url;
|
|
169
|
+
const relativeUrl = getRelativeUrl(currSegmentUrl, nextSegmentUrl);
|
|
170
|
+
if (relativeUrl !== null) {
|
|
171
|
+
if (relativeUrl !== ".") {
|
|
172
|
+
props.nor = encodeURIComponent(relativeUrl);
|
|
173
|
+
}
|
|
174
|
+
if (content.nextSegment.range !== undefined) {
|
|
175
|
+
props.nrr = String(content.nextSegment.range[0]) + "-";
|
|
176
|
+
if (isFinite(content.nextSegment.range[1])) {
|
|
177
|
+
props.nrr += String(content.nextSegment.range[1]);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
159
183
|
let precizeBufferLengthMs;
|
|
160
184
|
if (lastObservation !== undefined &&
|
|
161
185
|
(props.ot === "v" || props.ot === "a" || props.ot === "av")) {
|
|
@@ -266,6 +290,8 @@ export default class CmcdDataBuilder {
|
|
|
266
290
|
addNumberProperty("d", "object");
|
|
267
291
|
addNumberProperty("dl", "request");
|
|
268
292
|
addNumberProperty("mtp", "request");
|
|
293
|
+
addStringProperty("nor", "request");
|
|
294
|
+
addStringProperty("nrr", "request");
|
|
269
295
|
addTokenProperty("ot", "object");
|
|
270
296
|
addNumberProperty("pr", "session");
|
|
271
297
|
addNumberProperty("rtp", "status");
|
|
@@ -70,11 +70,35 @@ export interface ISegmentFetcherCallbacks<TSegmentDataType> {
|
|
|
70
70
|
}
|
|
71
71
|
/** Content used by the segment loader as a context to load a new segment. */
|
|
72
72
|
export interface ISegmentLoaderContent {
|
|
73
|
+
/** Manifest metadata linked to the wanted segment. */
|
|
73
74
|
manifest: IManifest;
|
|
75
|
+
/** Period metadata linked to the wanted segment. */
|
|
74
76
|
period: IPeriod;
|
|
77
|
+
/** Adaptation metadata linked to the wanted segment. */
|
|
75
78
|
adaptation: IAdaptation;
|
|
79
|
+
/** Representation metadata linked to the wanted segment. */
|
|
76
80
|
representation: IRepresentation;
|
|
81
|
+
/** Segment metadata linked to the wanted segment. */
|
|
77
82
|
segment: ISegment;
|
|
83
|
+
/**
|
|
84
|
+
* Optional next segment that may be requested after this one.
|
|
85
|
+
* Should only be set (to something else than `undefined`) if that following
|
|
86
|
+
* segment is part of the same `Representation`.
|
|
87
|
+
*
|
|
88
|
+
* This is only used as an hint, finally requesting another segment after this
|
|
89
|
+
* one due to unexpected changes (e.g. bandwidth update, track change etc.) is
|
|
90
|
+
* OK.
|
|
91
|
+
*
|
|
92
|
+
* This information is then used mostly for matters related yet not required
|
|
93
|
+
* by requests, such as CMCD reporting. In scenarios when it's not
|
|
94
|
+
* straightforward to guess which segment will be requested after this one,
|
|
95
|
+
* this property can be ignored (set to `undefined`).
|
|
96
|
+
*
|
|
97
|
+
* If `null` no segment will be requested next for now.
|
|
98
|
+
*
|
|
99
|
+
* If `undefined` we do not know which next segment will be requested.
|
|
100
|
+
*/
|
|
101
|
+
nextSegment: ISegment | null | undefined;
|
|
78
102
|
}
|
|
79
103
|
/**
|
|
80
104
|
* Callbacks given when creating an `ISegmentFetcher`, allowing to be notified
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segment_fetcher.d.ts","sourceRoot":"","sources":["../../../../../src/core/fetchers/segment/segment_fetcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,KAAK,EACV,SAAS,EACT,WAAW,EACX,QAAQ,EACR,OAAO,EACP,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAMV,6BAA6B,EAC7B,8BAA8B,EAC9B,gBAAgB,EACjB,MAAM,qBAAqB,CAAC;AAM7B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAExE,OAAO,KAAK,EACV,uBAAuB,EACvB,4BAA4B,EAC5B,0BAA0B,EAC1B,+BAA+B,EAChC,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,eAAe,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,cAAc,MAAM,oBAAoB,CAAC;AAQrD;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,aAAa,EAAE,gBAAgB,EAAE,EAC5E,UAAU,EACV,QAAQ,EACR,cAAc,EACd,eAAe,EACf,cAAc,EACd,cAAc,GACf,EAAE,wBAAwB,CACzB,aAAa,EACb,gBAAgB,CACjB,GAAG,eAAe,CAAC,gBAAgB,CAAC,CAwSpC;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,eAAe,CAAC,gBAAgB,IAAI;AAC9C,yCAAyC;AACzC,OAAO,EAAE,qBAAqB;AAC9B,sEAAsE;AACtE,SAAS,EAAE,wBAAwB,CAAC,gBAAgB,CAAC;AACrD,yDAAyD;AACzD,kBAAkB,EAAE,kBAAkB,KACnC,OAAO,CAAC,IAAI,CAAC,CAAC;AAEnB;;;GAGG;AACH,MAAM,WAAW,wBAAwB,CAAC,gBAAgB;IACxD,uEAAuE;IACvE,OAAO,CACL,KAAK,EAAE,CACL,aAAa,EAAE,MAAM,GAAG,SAAS,KAE/B,6BAA6B,CAAC,gBAAgB,CAAC,GAC/C,8BAA8B,CAAC,gBAAgB,CAAC,GACnD,IAAI,CAAC;IAER;;;;;;OAMG;IACH,mBAAmB,IAAI,IAAI,CAAC;IAE5B;;;OAGG;IACH,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;CACpC;AAED,6EAA6E;AAC7E,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,WAAW,CAAC;IACxB,cAAc,EAAE,eAAe,CAAC;IAChC,OAAO,EAAE,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"segment_fetcher.d.ts","sourceRoot":"","sources":["../../../../../src/core/fetchers/segment/segment_fetcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,KAAK,EACV,SAAS,EACT,WAAW,EACX,QAAQ,EACR,OAAO,EACP,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAMV,6BAA6B,EAC7B,8BAA8B,EAC9B,gBAAgB,EACjB,MAAM,qBAAqB,CAAC;AAM7B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAExE,OAAO,KAAK,EACV,uBAAuB,EACvB,4BAA4B,EAC5B,0BAA0B,EAC1B,+BAA+B,EAChC,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,eAAe,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,cAAc,MAAM,oBAAoB,CAAC;AAQrD;;;;;;;;GAQG;AACH,MAAM,CA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sDAAsD;IACtD,MAAM,EAAE,OAAO,CAAC;IAChB,8DAA8D;IAC9D,cAAc,EAAE,eAAe,CAAC;CACjC"}
|
|
@@ -183,9 +183,10 @@ export default class SegmentQueue extends EventEmitter {
|
|
|
183
183
|
contentInfo.mediaSegmentRequest.canceller.cancel();
|
|
184
184
|
}
|
|
185
185
|
const { downloadQueue, content, initSegmentInfoRef, currentCanceller } = contentInfo;
|
|
186
|
-
const
|
|
187
|
-
|
|
188
|
-
|
|
186
|
+
const recursivelyRequestSegments = () => {
|
|
187
|
+
var _a;
|
|
188
|
+
const { segmentQueue } = downloadQueue.getValue();
|
|
189
|
+
const startingSegment = segmentQueue[0];
|
|
189
190
|
if (currentCanceller !== null && currentCanceller.isUsed()) {
|
|
190
191
|
contentInfo.mediaSegmentRequest = null;
|
|
191
192
|
return;
|
|
@@ -200,7 +201,7 @@ export default class SegmentQueue extends EventEmitter {
|
|
|
200
201
|
? noop
|
|
201
202
|
: canceller.linkToSignal(currentCanceller.signal);
|
|
202
203
|
const { segment, priority } = startingSegment;
|
|
203
|
-
const context = objectAssign({ segment }, content);
|
|
204
|
+
const context = objectAssign({ segment, nextSegment: (_a = segmentQueue[1]) === null || _a === void 0 ? void 0 : _a.segment }, content);
|
|
204
205
|
/**
|
|
205
206
|
* If `true` , the current task has either errored, finished, or was
|
|
206
207
|
* cancelled.
|
|
@@ -237,7 +238,7 @@ export default class SegmentQueue extends EventEmitter {
|
|
|
237
238
|
lastQueue.shift();
|
|
238
239
|
}
|
|
239
240
|
isComplete = true;
|
|
240
|
-
recursivelyRequestSegments(
|
|
241
|
+
recursivelyRequestSegments();
|
|
241
242
|
};
|
|
242
243
|
/** Scheduled actual segment request. */
|
|
243
244
|
const request = this._segmentFetcher.createRequest(context, priority, {
|
|
@@ -316,7 +317,7 @@ export default class SegmentQueue extends EventEmitter {
|
|
|
316
317
|
});
|
|
317
318
|
contentInfo.mediaSegmentRequest = { segment, priority, request, canceller };
|
|
318
319
|
};
|
|
319
|
-
recursivelyRequestSegments(
|
|
320
|
+
recursivelyRequestSegments();
|
|
320
321
|
}
|
|
321
322
|
/**
|
|
322
323
|
* Internal logic performing initialization segment requests.
|
|
@@ -336,7 +337,7 @@ export default class SegmentQueue extends EventEmitter {
|
|
|
336
337
|
? noop
|
|
337
338
|
: canceller.linkToSignal(contentInfo.currentCanceller.signal);
|
|
338
339
|
const { segment, priority } = queuedInitSegment;
|
|
339
|
-
const context = objectAssign({ segment }, content);
|
|
340
|
+
const context = objectAssign({ segment, nextSegment: undefined }, content);
|
|
340
341
|
/**
|
|
341
342
|
* If `true` , the current task has either errored, finished, or was
|
|
342
343
|
* cancelled.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"video_thumbnail_loader.d.ts","sourceRoot":"","sources":["../../../../../src/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAW5D,OAAO,KAAK,EAAgB,QAAQ,EAAE,MAAM,SAAS,CAAC;AAOtD;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,OAAO,oBAAoB;IACvC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAmB;IACjD,OAAO,CAAC,OAAO,CAAY;IAC3B,OAAO,CAAC,uBAAuB,CAAiD;gBAEpE,YAAY,EAAE,gBAAgB,EAAE,MAAM,EAAE,SAAS;IAM7D;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,GAAG,IAAI;IAIhE;;;;;;;;;OASG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"video_thumbnail_loader.d.ts","sourceRoot":"","sources":["../../../../../src/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAW5D,OAAO,KAAK,EAAgB,QAAQ,EAAE,MAAM,SAAS,CAAC;AAOtD;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,OAAO,oBAAoB;IACvC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAmB;IACjD,OAAO,CAAC,OAAO,CAAY;IAC3B,OAAO,CAAC,uBAAuB,CAAiD;gBAEpE,YAAY,EAAE,gBAAgB,EAAE,MAAM,EAAE,SAAS;IAM7D;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,GAAG,IAAI;IAIhE;;;;;;;;;OASG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAuPtC;;;OAGG;IACH,OAAO,IAAI,IAAI;CAMhB;AA+GD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -149,7 +149,7 @@ export default class VideoThumbnailLoader {
|
|
|
149
149
|
lastRepInfo.initSegmentUniqueId = null;
|
|
150
150
|
return sourceBufferInterface;
|
|
151
151
|
}
|
|
152
|
-
const segmentInfo = objectAssign({ segment: initSegment }, content);
|
|
152
|
+
const segmentInfo = objectAssign({ segment: initSegment, nextSegment: undefined }, content);
|
|
153
153
|
await loadAndPushSegment(segmentInfo, sourceBufferInterface, lastRepInfo.segmentFetcher, lastRepInfoCleaner.signal);
|
|
154
154
|
return sourceBufferInterface;
|
|
155
155
|
});
|
|
@@ -193,7 +193,7 @@ export default class VideoThumbnailLoader {
|
|
|
193
193
|
else {
|
|
194
194
|
const requestCanceller = new TaskCanceller();
|
|
195
195
|
const unlinkSignal = requestCanceller.linkToSignal(lastRepInfo.cleaner.signal);
|
|
196
|
-
const segmentInfo = objectAssign({ segment }, content);
|
|
196
|
+
const segmentInfo = objectAssign({ segment, nextSegment: undefined }, content);
|
|
197
197
|
const prom = loadAndPushSegment(segmentInfo, sourceBufferInterface, lastRepInfo.segmentFetcher, requestCanceller.signal).then(unlinkSignal, (err) => {
|
|
198
198
|
unlinkSignal();
|
|
199
199
|
throw err;
|
|
@@ -142,7 +142,7 @@ class Player extends EventEmitter {
|
|
|
142
142
|
// Workaround to support Firefox autoplay on FF 42.
|
|
143
143
|
// See: https://bugzilla.mozilla.org/show_bug.cgi?id=1194624
|
|
144
144
|
videoElement.preload = "auto";
|
|
145
|
-
this.version = /* PLAYER_VERSION */ "4.2.0-dev.
|
|
145
|
+
this.version = /* PLAYER_VERSION */ "4.2.0-dev.2024091600";
|
|
146
146
|
this.log = log;
|
|
147
147
|
this.state = "STOPPED";
|
|
148
148
|
this.videoElement = videoElement;
|
|
@@ -2456,5 +2456,5 @@ class Player extends EventEmitter {
|
|
|
2456
2456
|
* Use of a WeakSet ensure the object is garbage collected if it's not used anymore.
|
|
2457
2457
|
*/
|
|
2458
2458
|
Player._priv_currentlyUsedVideoElements = new WeakSet();
|
|
2459
|
-
Player.version = /* PLAYER_VERSION */ "4.2.0-dev.
|
|
2459
|
+
Player.version = /* PLAYER_VERSION */ "4.2.0-dev.2024091600";
|
|
2460
2460
|
export default Player;
|
|
@@ -18,7 +18,7 @@ import log from "../../../../log";
|
|
|
18
18
|
import arrayFind from "../../../../utils/array_find";
|
|
19
19
|
import isNullOrUndefined from "../../../../utils/is_null_or_undefined";
|
|
20
20
|
import getMonotonicTimeStamp from "../../../../utils/monotonic_timestamp";
|
|
21
|
-
import { getFilenameIndexInUrl } from "../../../../utils/
|
|
21
|
+
import { getFilenameIndexInUrl } from "../../../../utils/url-utils";
|
|
22
22
|
import ContentProtectionParser from "./content_protection_parser";
|
|
23
23
|
import getClockOffset from "./get_clock_offset";
|
|
24
24
|
import getHTTPUTCTimingURL from "./get_http_utc-timing_url";
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import resolveURL from "../../../../utils/
|
|
16
|
+
import { resolveURL } from "../../../../utils/url-utils";
|
|
17
17
|
/**
|
|
18
18
|
* @param {Array.<string>} currentBaseURLs
|
|
19
19
|
* @param {Array.<Object>} newBaseUrlsIR
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdaptationSet.d.ts","sourceRoot":"","sources":["../../../../../../../../src/parsers/manifest/dash/wasm-parser/ts/generators/AdaptationSet.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EACV,wBAAwB,EACxB,sBAAsB,EAEvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,KAAK,YAAY,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"AdaptationSet.d.ts","sourceRoot":"","sources":["../../../../../../../../src/parsers/manifest/dash/wasm-parser/ts/generators/AdaptationSet.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EACV,wBAAwB,EACxB,sBAAsB,EAEvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,KAAK,YAAY,MAAM,kBAAkB,CAAC;AAgBjD;;;;;;GAMG;AACH,wBAAgB,mCAAmC,CACjD,qBAAqB,EAAE,sBAAsB,EAC7C,YAAY,EAAE,WAAW,CAAC,MAAM,EAChC,YAAY,EAAE,YAAY,GACzB,eAAe,CAkLjB;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAC7C,eAAe,EAAE,wBAAwB,EACzC,YAAY,EAAE,WAAW,CAAC,MAAM,GAC/B,gBAAgB,CA+IlB"}
|
|
@@ -18,6 +18,7 @@ import { parseFloatOrBool, parseString } from "../utils";
|
|
|
18
18
|
import { generateBaseUrlAttrParser } from "./BaseURL";
|
|
19
19
|
import { generateContentComponentAttrParser } from "./ContentComponent";
|
|
20
20
|
import { generateContentProtectionAttrParser } from "./ContentProtection";
|
|
21
|
+
import { generateLabelElementParser } from "./Label";
|
|
21
22
|
import { generateRepresentationAttrParser, generateRepresentationChildrenParser, } from "./Representation";
|
|
22
23
|
import { generateSchemeAttrParser } from "./Scheme";
|
|
23
24
|
import { generateSegmentBaseAttrParser } from "./SegmentBase";
|
|
@@ -147,6 +148,11 @@ export function generateAdaptationSetChildrenParser(adaptationSetChildren, linea
|
|
|
147
148
|
generateSegmentTemplateAttrParser(stObj, linearMemory));
|
|
148
149
|
break;
|
|
149
150
|
}
|
|
151
|
+
case 21 /* TagName.Label */: {
|
|
152
|
+
parsersStack.pushParsers(nodeId, noop, // Label as treated like an attribute
|
|
153
|
+
generateLabelElementParser(adaptationSetChildren, linearMemory));
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
150
156
|
default:
|
|
151
157
|
// Allows to make sure we're not mistakenly closing a re-opened
|
|
152
158
|
// tag.
|
|
@@ -258,11 +264,6 @@ export function generateAdaptationSetAttrParser(adaptationAttrs, linearMemory) {
|
|
|
258
264
|
case 22 /* AttributeName.AvailabilityTimeComplete */:
|
|
259
265
|
adaptationAttrs.availabilityTimeComplete = dataView.getUint8(0) === 0;
|
|
260
266
|
break;
|
|
261
|
-
case 71 /* AttributeName.Label */: {
|
|
262
|
-
const label = parseString(textDecoder, linearMemory.buffer, ptr, len);
|
|
263
|
-
adaptationAttrs.label = label;
|
|
264
|
-
break;
|
|
265
|
-
}
|
|
266
267
|
// TODO
|
|
267
268
|
// case AttributeName.StartsWithSap:
|
|
268
269
|
// adaptationAttrs.startsWithSap = dataView.getFloat64(ptr, true);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { IAdaptationSetChildren } from "../../../node_parser_types";
|
|
2
|
+
import type { IAttributeParser } from "../parsers_stack";
|
|
3
|
+
export declare function generateLabelElementParser(adaptationSet: IAdaptationSetChildren, linearMemory: WebAssembly.Memory): IAttributeParser;
|
|
4
|
+
//# sourceMappingURL=Label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../../../../../../src/parsers/manifest/dash/wasm-parser/ts/generators/Label.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAIzD,wBAAgB,0BAA0B,CACxC,aAAa,EAAE,sBAAsB,EACrC,YAAY,EAAE,WAAW,CAAC,MAAM,GAC/B,gBAAgB,CAOlB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { parseString } from "../utils";
|
|
2
|
+
export function generateLabelElementParser(adaptationSet, linearMemory) {
|
|
3
|
+
const textDecoder = new TextDecoder();
|
|
4
|
+
return function onMPDAttribute(attr, ptr, len) {
|
|
5
|
+
if (attr === 64 /* AttributeName.Text */) {
|
|
6
|
+
adaptationSet.label = parseString(textDecoder, linearMemory.buffer, ptr, len);
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/parsers/manifest/dash/wasm-parser/ts/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;GAKG;AACH,0BAAkB,eAAe;IAC/B;;;;;OAKG;IACH,GAAG,IAAI;IAEP,6DAA6D;IAC7D,KAAK,IAAI;CACV;AAED;;;;;GAKG;AACH,0BAAkB,OAAO;IAGvB,GAAG,IAAI;IAKP,MAAM,IAAI;IAGV,SAAS,IAAI;IAKb,aAAa,IAAI;IAGjB,W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AAK,CAAE,SAAS;IAG5B,KAAK,KAAK;IACV,YAAY,KAAK,CAAE,MAAM;IACzB,YAAY,KAAK,CAAE,MAAM;IACzB,SAAS,KAAK,CAAE,MAAM;IACtB,QAAQ,KAAK,CAAE,MAAM;IACrB,YAAY,KAAK,CAAE,MAAM;IACzB,YAAY,KAAK,CAAE,MAAM;IACzB,SAAS,KAAK,CAAE,MAAM;IACtB,QAAQ,KAAK,CAAE,MAAM;IACrB,iBAAiB,KAAK;IACtB,gBAAgB,KAAK;IACrB,mBAAmB,KAAK;IAGxB,QAAQ,KAAK,CAAE,SAAS;IACxB,WAAW,KAAK,CAAE,SAAS;IAC3B,GAAG,KAAK;IAGR,OAAO,KAAK,CAAE,MAAM;IAEpB,IAAI,KAAK;IACT,cAAc,KAAK;IACnB,QAAQ,KAAK;IAEb,mBAAmB,KAAK;IAMxB,yBAAyB,KAAK;IAU9B,mBAAmB,KAAK;IA8BxB,SAAS,KAAK;IAEd,KAAK,KAAK,CAAE,SAAS;IAErB,eAAe,KAAK,CAAE,SAAS;IAE/B,gBAAgB,KAAK,CAAE,UAAU;IAEjC,cAAc,KAAK,CAAE,SAAS;IAE9B,sBAAsB,KAAK;IAG3B,SAAS,KAAK,CAAE,MAAM;IAEtB,kBAAkB,KAAK;CACxB"}
|
|
@@ -19,7 +19,7 @@ import { StaticRepresentationIndex } from "../../../manifest/classes";
|
|
|
19
19
|
import idGenerator from "../../../utils/id_generator";
|
|
20
20
|
import isNullOrUndefined from "../../../utils/is_null_or_undefined";
|
|
21
21
|
import getMonotonicTimeStamp from "../../../utils/monotonic_timestamp";
|
|
22
|
-
import { getFilenameIndexInUrl } from "../../../utils/
|
|
22
|
+
import { getFilenameIndexInUrl } from "../../../utils/url-utils";
|
|
23
23
|
import MetaRepresentationIndex from "./representation_index";
|
|
24
24
|
/**
|
|
25
25
|
* Parse playlist string to JSON.
|
|
@@ -22,8 +22,8 @@ import isNonEmptyString from "../../../utils/is_non_empty_string";
|
|
|
22
22
|
import isNullOrUndefined from "../../../utils/is_null_or_undefined";
|
|
23
23
|
import getMonotonicTimeStamp from "../../../utils/monotonic_timestamp";
|
|
24
24
|
import objectAssign from "../../../utils/object_assign";
|
|
25
|
-
import { getFilenameIndexInUrl } from "../../../utils/resolve_url";
|
|
26
25
|
import { hexToBytes } from "../../../utils/string_parsing";
|
|
26
|
+
import { getFilenameIndexInUrl } from "../../../utils/url-utils";
|
|
27
27
|
import { createBox } from "../../containers/isobmff";
|
|
28
28
|
import checkManifestIDs from "../utils/check_manifest_ids";
|
|
29
29
|
import { getAudioCodecs, getVideoCodecs } from "./get_codecs";
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import resolveURL from "../../utils/
|
|
16
|
+
import { resolveURL } from "../../utils/url-utils";
|
|
17
17
|
export default function constructSegmentUrl(wantedCdn, segment) {
|
|
18
18
|
if (wantedCdn === null) {
|
|
19
19
|
return null;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import resolveURL from "../../utils/
|
|
16
|
+
import { resolveURL } from "../../utils/url-utils";
|
|
17
17
|
/**
|
|
18
18
|
* Returns `true` if the given Representation refers to segments in an MP4
|
|
19
19
|
* container
|
|
@@ -22,6 +22,18 @@
|
|
|
22
22
|
* @returns {number}
|
|
23
23
|
*/
|
|
24
24
|
declare function getFilenameIndexInUrl(url: string): number;
|
|
25
|
+
/**
|
|
26
|
+
* Take two URLs and try to construct a relative URL for the second (`newUrl`)
|
|
27
|
+
* relative to the first (`baseUrl`).
|
|
28
|
+
*
|
|
29
|
+
* Returns `null` if they appear to be on different domains, depend on
|
|
30
|
+
* different schemes or if we don't have enough information to compute the
|
|
31
|
+
* relative URL.
|
|
32
|
+
* @param {string} baseUrl
|
|
33
|
+
* @param {string} newUrl
|
|
34
|
+
* @returns {string}
|
|
35
|
+
*/
|
|
36
|
+
declare function getRelativeUrl(baseUrl: string, newUrl: string): string | null;
|
|
25
37
|
/**
|
|
26
38
|
* Resolves multiple URL segments using the RFC 3986 URL resolution algorithm.
|
|
27
39
|
*
|
|
@@ -33,7 +45,6 @@ declare function getFilenameIndexInUrl(url: string): number;
|
|
|
33
45
|
* @param {...(string|undefined)} args - The URL segments to resolve.
|
|
34
46
|
* @returns {string} The resolved URL as a string.
|
|
35
47
|
*/
|
|
36
|
-
|
|
37
|
-
export { getFilenameIndexInUrl };
|
|
38
|
-
|
|
39
|
-
//# sourceMappingURL=resolve_url.d.ts.map
|
|
48
|
+
declare function resolveURL(...args: Array<string | undefined>): string;
|
|
49
|
+
export { getFilenameIndexInUrl, getRelativeUrl, resolveURL };
|
|
50
|
+
//# sourceMappingURL=url-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url-utils.d.ts","sourceRoot":"","sources":["../../../src/utils/url-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAuBH;;;;;;;GAOG;AACH,iBAAS,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAuBlD;AAED;;;;;;;;;;GAUG;AACH,iBAAS,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAkEtE;AAsLD;;;;;;;;;;GAUG;AACH,iBAAS,UAAU,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,GAAG,MAAM,CAe9D;AAED,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -59,6 +59,75 @@ function getFilenameIndexInUrl(url) {
|
|
|
59
59
|
}
|
|
60
60
|
return indexOfLastSlash + 1;
|
|
61
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Take two URLs and try to construct a relative URL for the second (`newUrl`)
|
|
64
|
+
* relative to the first (`baseUrl`).
|
|
65
|
+
*
|
|
66
|
+
* Returns `null` if they appear to be on different domains, depend on
|
|
67
|
+
* different schemes or if we don't have enough information to compute the
|
|
68
|
+
* relative URL.
|
|
69
|
+
* @param {string} baseUrl
|
|
70
|
+
* @param {string} newUrl
|
|
71
|
+
* @returns {string}
|
|
72
|
+
*/
|
|
73
|
+
function getRelativeUrl(baseUrl, newUrl) {
|
|
74
|
+
const baseParts = parseURL(baseUrl);
|
|
75
|
+
const newParts = parseURL(newUrl);
|
|
76
|
+
if (baseParts.scheme !== newParts.scheme ||
|
|
77
|
+
baseParts.authority !== newParts.authority) {
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
if (
|
|
81
|
+
// if base and new path are mixed between absolute and relative path, return null
|
|
82
|
+
(baseParts.path[0] !== undefined &&
|
|
83
|
+
baseParts.path[0] !== "/" &&
|
|
84
|
+
newParts.path[0] === "/") ||
|
|
85
|
+
(newParts.path[0] !== undefined &&
|
|
86
|
+
newParts.path[0] !== "/" &&
|
|
87
|
+
baseParts.path[0] === "/")) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
const baseNormalizedPath = removeDotSegment(baseParts.path);
|
|
91
|
+
const newNormalizedPath = removeDotSegment(newParts.path);
|
|
92
|
+
let relativePath;
|
|
93
|
+
if (baseNormalizedPath === newNormalizedPath) {
|
|
94
|
+
relativePath = "";
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
const basePathSplitted = baseNormalizedPath.split("/");
|
|
98
|
+
// remove everything after the last trailing /
|
|
99
|
+
basePathSplitted.pop();
|
|
100
|
+
const newPathSplitted = newNormalizedPath.split("/");
|
|
101
|
+
while (basePathSplitted.length > 0 &&
|
|
102
|
+
newPathSplitted.length > 0 &&
|
|
103
|
+
basePathSplitted[0] === newPathSplitted[0]) {
|
|
104
|
+
basePathSplitted.shift();
|
|
105
|
+
newPathSplitted.shift();
|
|
106
|
+
}
|
|
107
|
+
while (basePathSplitted.length > 0) {
|
|
108
|
+
basePathSplitted.shift();
|
|
109
|
+
newPathSplitted.unshift("..");
|
|
110
|
+
}
|
|
111
|
+
let pathJoined = newPathSplitted.join("/");
|
|
112
|
+
if (pathJoined.endsWith("../") || pathJoined.endsWith("./")) {
|
|
113
|
+
pathJoined = pathJoined.slice(0, pathJoined.length - 1);
|
|
114
|
+
}
|
|
115
|
+
relativePath = pathJoined === "" ? "." : pathJoined;
|
|
116
|
+
}
|
|
117
|
+
let result = relativePath;
|
|
118
|
+
if (relativePath === "" && newParts.query === baseParts.query) {
|
|
119
|
+
// path and query is the same, we don't need to rewrite it
|
|
120
|
+
}
|
|
121
|
+
else if (newParts.query) {
|
|
122
|
+
result += "?";
|
|
123
|
+
result += newParts.query;
|
|
124
|
+
}
|
|
125
|
+
if (newParts.fragment) {
|
|
126
|
+
result += "#";
|
|
127
|
+
result += newParts.fragment;
|
|
128
|
+
}
|
|
129
|
+
return result;
|
|
130
|
+
}
|
|
62
131
|
/**
|
|
63
132
|
* Resolve the output URL from the baseURL and the relative reference as
|
|
64
133
|
* specified by RFC 3986 section 5.
|
|
@@ -232,7 +301,7 @@ function mergePaths(baseParts, relativePath) {
|
|
|
232
301
|
* @param {...(string|undefined)} args - The URL segments to resolve.
|
|
233
302
|
* @returns {string} The resolved URL as a string.
|
|
234
303
|
*/
|
|
235
|
-
|
|
304
|
+
function resolveURL(...args) {
|
|
236
305
|
var _a, _b, _c;
|
|
237
306
|
const filteredArgs = args.filter((val) => val !== "");
|
|
238
307
|
const len = filteredArgs.length;
|
|
@@ -250,5 +319,4 @@ export function resolveURL(...args) {
|
|
|
250
319
|
return resolveURL(resolvedURL, ...remainingArgs);
|
|
251
320
|
}
|
|
252
321
|
}
|
|
253
|
-
export { getFilenameIndexInUrl };
|
|
254
|
-
export default resolveURL;
|
|
322
|
+
export { getFilenameIndexInUrl, getRelativeUrl, resolveURL };
|
package/dist/mpd-parser.wasm
CHANGED
|
Binary file
|