rx-player 4.1.0-dev.2024061700 → 4.1.0
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 +5 -1
- package/VERSION +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/main/common/content_time_boundaries_observer.js +41 -19
- package/dist/commonjs/core/segment_sinks/garbage_collector.js +44 -24
- package/dist/commonjs/core/segment_sinks/inventory/utils.js +25 -3
- package/dist/commonjs/errors/custom_loader_error.d.ts +0 -1
- package/dist/commonjs/errors/custom_loader_error.d.ts.map +1 -1
- package/dist/commonjs/errors/custom_loader_error.js +1 -2
- package/dist/commonjs/errors/encrypted_media_error.d.ts +0 -1
- package/dist/commonjs/errors/encrypted_media_error.d.ts.map +1 -1
- package/dist/commonjs/errors/encrypted_media_error.js +1 -2
- package/dist/commonjs/errors/media_error.d.ts +0 -1
- package/dist/commonjs/errors/media_error.d.ts.map +1 -1
- package/dist/commonjs/errors/media_error.js +1 -2
- package/dist/commonjs/errors/network_error.d.ts +0 -1
- package/dist/commonjs/errors/network_error.d.ts.map +1 -1
- package/dist/commonjs/errors/network_error.js +1 -2
- package/dist/commonjs/errors/other_error.d.ts +0 -1
- package/dist/commonjs/errors/other_error.d.ts.map +1 -1
- package/dist/commonjs/errors/other_error.js +1 -2
- package/dist/commonjs/errors/source_buffer_error.d.ts +0 -1
- package/dist/commonjs/errors/source_buffer_error.d.ts.map +1 -1
- package/dist/commonjs/errors/source_buffer_error.js +1 -2
- package/dist/commonjs/errors/worker_initialization_error.d.ts +0 -1
- package/dist/commonjs/errors/worker_initialization_error.d.ts.map +1 -1
- package/dist/commonjs/errors/worker_initialization_error.js +1 -2
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader_error.d.ts +0 -1
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader_error.d.ts.map +1 -1
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader_error.js +2 -2
- package/dist/commonjs/main_thread/api/debug/buffer_graph.js +48 -15
- package/dist/commonjs/main_thread/api/debug/modules/segment_buffer_content.d.ts.map +1 -1
- package/dist/commonjs/main_thread/api/debug/modules/segment_buffer_content.js +38 -17
- package/dist/commonjs/main_thread/api/public_api.js +2 -2
- package/dist/commonjs/main_thread/decrypt/session_events_listener.js +2 -2
- package/dist/commonjs/main_thread/decrypt/utils/check_key_statuses.js +1 -1
- package/dist/commonjs/main_thread/init/multi_thread_content_initializer.js +19 -9
- package/dist/commonjs/main_thread/init/utils/rebuffering_controller.js +48 -26
- package/dist/commonjs/main_thread/init/utils/stream_events_emitter/refresh_scheduled_events_list.d.ts.map +1 -1
- package/dist/commonjs/main_thread/init/utils/stream_events_emitter/refresh_scheduled_events_list.js +85 -54
- package/dist/commonjs/main_thread/text_displayer/html/html_text_displayer.d.ts.map +1 -1
- package/dist/commonjs/main_thread/text_displayer/html/html_text_displayer.js +65 -12
- package/dist/commonjs/main_thread/text_displayer/html/text_track_cues_store.js +39 -7
- package/dist/commonjs/main_thread/text_displayer/native/native_text_displayer.js +27 -5
- package/dist/commonjs/parsers/containers/isobmff/utils.d.ts.map +1 -1
- package/dist/commonjs/parsers/containers/isobmff/utils.js +3 -1
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/utils.d.ts +0 -1
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/utils.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/utils.js +1 -2
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/utils.d.ts +0 -1
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/utils.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/utils.js +1 -2
- package/dist/commonjs/playback_observer/utils/observation_position.d.ts +11 -0
- package/dist/commonjs/playback_observer/utils/observation_position.d.ts.map +1 -1
- package/dist/commonjs/playback_observer/utils/observation_position.js +11 -0
- package/dist/commonjs/transports/dash/low_latency_segment_loader.d.ts.map +1 -1
- package/dist/commonjs/transports/dash/low_latency_segment_loader.js +1 -0
- package/dist/commonjs/utils/assert.d.ts +0 -1
- package/dist/commonjs/utils/assert.d.ts.map +1 -1
- package/dist/commonjs/utils/assert.js +1 -2
- package/dist/commonjs/utils/request/fetch.d.ts.map +1 -1
- package/dist/commonjs/utils/request/fetch.js +14 -0
- package/dist/commonjs/utils/request/request_error.d.ts +0 -1
- package/dist/commonjs/utils/request/request_error.d.ts.map +1 -1
- package/dist/commonjs/utils/request/request_error.js +14 -12
- package/dist/commonjs/utils/request/xhr.d.ts.map +1 -1
- package/dist/commonjs/utils/request/xhr.js +17 -0
- package/dist/commonjs/utils/task_canceller.d.ts +0 -1
- package/dist/commonjs/utils/task_canceller.d.ts.map +1 -1
- package/dist/commonjs/utils/task_canceller.js +3 -2
- 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/main/common/content_time_boundaries_observer.js +6 -6
- package/dist/es2017/core/segment_sinks/garbage_collector.js +2 -4
- package/dist/es2017/core/segment_sinks/inventory/utils.js +3 -3
- package/dist/es2017/errors/custom_loader_error.d.ts +0 -1
- package/dist/es2017/errors/custom_loader_error.d.ts.map +1 -1
- package/dist/es2017/errors/custom_loader_error.js +1 -2
- package/dist/es2017/errors/encrypted_media_error.d.ts +0 -1
- package/dist/es2017/errors/encrypted_media_error.d.ts.map +1 -1
- package/dist/es2017/errors/encrypted_media_error.js +1 -2
- package/dist/es2017/errors/media_error.d.ts +0 -1
- package/dist/es2017/errors/media_error.d.ts.map +1 -1
- package/dist/es2017/errors/media_error.js +1 -2
- package/dist/es2017/errors/network_error.d.ts +0 -1
- package/dist/es2017/errors/network_error.d.ts.map +1 -1
- package/dist/es2017/errors/network_error.js +1 -2
- package/dist/es2017/errors/other_error.d.ts +0 -1
- package/dist/es2017/errors/other_error.d.ts.map +1 -1
- package/dist/es2017/errors/other_error.js +1 -2
- package/dist/es2017/errors/source_buffer_error.d.ts +0 -1
- package/dist/es2017/errors/source_buffer_error.d.ts.map +1 -1
- package/dist/es2017/errors/source_buffer_error.js +1 -2
- package/dist/es2017/errors/worker_initialization_error.d.ts +0 -1
- package/dist/es2017/errors/worker_initialization_error.d.ts.map +1 -1
- package/dist/es2017/errors/worker_initialization_error.js +1 -2
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader_error.d.ts +0 -1
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader_error.d.ts.map +1 -1
- package/dist/es2017/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader_error.js +2 -2
- package/dist/es2017/main_thread/api/debug/buffer_graph.js +6 -6
- package/dist/es2017/main_thread/api/debug/modules/segment_buffer_content.d.ts.map +1 -1
- package/dist/es2017/main_thread/api/debug/modules/segment_buffer_content.js +1 -2
- package/dist/es2017/main_thread/api/public_api.js +2 -2
- package/dist/es2017/main_thread/decrypt/session_events_listener.js +2 -2
- package/dist/es2017/main_thread/decrypt/utils/check_key_statuses.js +1 -1
- package/dist/es2017/main_thread/init/multi_thread_content_initializer.js +1 -2
- package/dist/es2017/main_thread/init/utils/rebuffering_controller.js +3 -3
- package/dist/es2017/main_thread/init/utils/stream_events_emitter/refresh_scheduled_events_list.d.ts.map +1 -1
- package/dist/es2017/main_thread/init/utils/stream_events_emitter/refresh_scheduled_events_list.js +2 -4
- package/dist/es2017/main_thread/text_displayer/html/html_text_displayer.d.ts.map +1 -1
- package/dist/es2017/main_thread/text_displayer/html/html_text_displayer.js +7 -8
- package/dist/es2017/main_thread/text_displayer/html/text_track_cues_store.js +7 -7
- package/dist/es2017/main_thread/text_displayer/native/native_text_displayer.js +2 -2
- package/dist/es2017/parsers/containers/isobmff/utils.d.ts.map +1 -1
- package/dist/es2017/parsers/containers/isobmff/utils.js +3 -1
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/utils.d.ts +0 -1
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/utils.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/utils.js +1 -2
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/utils.d.ts +0 -1
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/utils.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/utils.js +1 -2
- package/dist/es2017/playback_observer/utils/observation_position.d.ts +11 -0
- package/dist/es2017/playback_observer/utils/observation_position.d.ts.map +1 -1
- package/dist/es2017/playback_observer/utils/observation_position.js +11 -0
- package/dist/es2017/transports/dash/low_latency_segment_loader.d.ts.map +1 -1
- package/dist/es2017/transports/dash/low_latency_segment_loader.js +1 -0
- package/dist/es2017/utils/assert.d.ts +0 -1
- package/dist/es2017/utils/assert.d.ts.map +1 -1
- package/dist/es2017/utils/assert.js +1 -2
- package/dist/es2017/utils/request/fetch.d.ts.map +1 -1
- package/dist/es2017/utils/request/fetch.js +14 -0
- package/dist/es2017/utils/request/request_error.d.ts +0 -1
- package/dist/es2017/utils/request/request_error.d.ts.map +1 -1
- package/dist/es2017/utils/request/request_error.js +13 -12
- package/dist/es2017/utils/request/xhr.d.ts.map +1 -1
- package/dist/es2017/utils/request/xhr.js +17 -0
- package/dist/es2017/utils/task_canceller.d.ts +0 -1
- package/dist/es2017/utils/task_canceller.d.ts.map +1 -1
- package/dist/es2017/utils/task_canceller.js +2 -2
- package/dist/rx-player.js +16 -16
- package/dist/worker.js +6 -6
- package/package.json +2 -12
- package/src/__GENERATED_CODE/embedded_worker.ts +1 -1
- package/src/core/main/common/content_time_boundaries_observer.ts +6 -6
- package/src/core/segment_sinks/garbage_collector.ts +2 -4
- package/src/core/segment_sinks/inventory/utils.ts +3 -3
- package/src/errors/custom_loader_error.ts +1 -4
- package/src/errors/encrypted_media_error.ts +1 -3
- package/src/errors/media_error.ts +1 -3
- package/src/errors/network_error.ts +1 -3
- package/src/errors/other_error.ts +1 -3
- package/src/errors/source_buffer_error.ts +1 -3
- package/src/errors/worker_initialization_error.ts +1 -3
- package/src/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader_error.ts +3 -3
- package/src/main_thread/api/debug/buffer_graph.ts +5 -6
- package/src/main_thread/api/debug/modules/segment_buffer_content.ts +1 -2
- package/src/main_thread/api/public_api.ts +2 -2
- package/src/main_thread/decrypt/session_events_listener.ts +2 -2
- package/src/main_thread/decrypt/utils/check_key_statuses.ts +1 -1
- package/src/main_thread/init/multi_thread_content_initializer.ts +1 -2
- package/src/main_thread/init/utils/rebuffering_controller.ts +3 -3
- package/src/main_thread/init/utils/stream_events_emitter/refresh_scheduled_events_list.ts +2 -4
- package/src/main_thread/text_displayer/html/html_text_displayer.ts +7 -8
- package/src/main_thread/text_displayer/html/text_track_cues_store.ts +7 -7
- package/src/main_thread/text_displayer/native/native_text_displayer.ts +2 -2
- package/src/parsers/containers/isobmff/utils.ts +3 -1
- package/src/parsers/manifest/dash/fast-js-parser/node_parsers/utils.ts +1 -3
- package/src/parsers/manifest/dash/native-parser/node_parsers/utils.ts +1 -4
- package/src/playback_observer/utils/observation_position.ts +11 -0
- package/src/transports/dash/low_latency_segment_loader.ts +1 -0
- package/src/utils/assert.ts +1 -3
- package/src/utils/request/fetch.ts +14 -0
- package/src/utils/request/request_error.ts +16 -15
- package/src/utils/request/xhr.ts +17 -0
- package/src/utils/task_canceller.ts +2 -3
|
@@ -216,8 +216,8 @@ export default class ContentTimeBoundariesObserver extends EventEmitter {
|
|
|
216
216
|
}
|
|
217
217
|
for (const period of streamInfo.activePeriods.toArray()) {
|
|
218
218
|
let wasFoundInAllTypes = true;
|
|
219
|
-
for (
|
|
220
|
-
const streamInfo2 = this._activeStreams.get(
|
|
219
|
+
for (const bufferType of this._allBufferTypes) {
|
|
220
|
+
const streamInfo2 = this._activeStreams.get(bufferType);
|
|
221
221
|
if (streamInfo2 === undefined) {
|
|
222
222
|
return;
|
|
223
223
|
}
|
|
@@ -413,10 +413,10 @@ function getLastAvailablePositionFromAdaptation(adaptation) {
|
|
|
413
413
|
* This variable allows to optimize the logic here when this is the case.
|
|
414
414
|
*/
|
|
415
415
|
let lastIndex;
|
|
416
|
-
for (
|
|
417
|
-
if (
|
|
418
|
-
lastIndex =
|
|
419
|
-
const lastPosition =
|
|
416
|
+
for (const representation of representations) {
|
|
417
|
+
if (representation.index !== lastIndex) {
|
|
418
|
+
lastIndex = representation.index;
|
|
419
|
+
const lastPosition = representation.index.getLastAvailablePosition();
|
|
420
420
|
if (lastPosition === undefined) {
|
|
421
421
|
// we cannot tell
|
|
422
422
|
return undefined;
|
|
@@ -78,8 +78,7 @@ async function clearBuffer(segmentSink, position, buffered, maxBufferBehind, max
|
|
|
78
78
|
return;
|
|
79
79
|
}
|
|
80
80
|
// begin from the oldest
|
|
81
|
-
for (
|
|
82
|
-
const outerRange = outerRanges[i];
|
|
81
|
+
for (const outerRange of outerRanges) {
|
|
83
82
|
if (position - maxBufferBehind >= outerRange.end) {
|
|
84
83
|
cleanedupRanges.push(outerRange);
|
|
85
84
|
}
|
|
@@ -106,8 +105,7 @@ async function clearBuffer(segmentSink, position, buffered, maxBufferBehind, max
|
|
|
106
105
|
return;
|
|
107
106
|
}
|
|
108
107
|
// begin from the oldest
|
|
109
|
-
for (
|
|
110
|
-
const outerRange = outerRanges[i];
|
|
108
|
+
for (const outerRange of outerRanges) {
|
|
111
109
|
if (position + maxBufferAhead <= outerRange.start) {
|
|
112
110
|
cleanedupRanges.push(outerRange);
|
|
113
111
|
}
|
|
@@ -39,9 +39,9 @@ export function getLastSegmentBeforePeriod(inventory, period) {
|
|
|
39
39
|
* @returns {Object|null}
|
|
40
40
|
*/
|
|
41
41
|
export function getFirstSegmentAfterPeriod(inventory, period) {
|
|
42
|
-
for (
|
|
43
|
-
if (
|
|
44
|
-
return
|
|
42
|
+
for (const segment of inventory) {
|
|
43
|
+
if (segment.infos.period.start > period.start) {
|
|
44
|
+
return segment;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom_loader_error.d.ts","sourceRoot":"","sources":["../../../src/errors/custom_loader_error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,KAAK;IAClD,SAAgB,IAAI,EAAE,mBAAmB,CAAC;IAC1C,SAAgB,
|
|
1
|
+
{"version":3,"file":"custom_loader_error.d.ts","sourceRoot":"","sources":["../../../src/errors/custom_loader_error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,KAAK;IAClD,SAAgB,IAAI,EAAE,mBAAmB,CAAC;IAC1C,SAAgB,QAAQ,EAAE,OAAO,CAAC;IAClC,SAAgB,GAAG,EAAE,cAAc,GAAG,SAAS,CAAC;IAEhD;;;;OAIG;gBACS,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,cAAc,GAAG,SAAS;CAShF"}
|
|
@@ -29,11 +29,10 @@ export default class CustomLoaderError extends Error {
|
|
|
29
29
|
* @param {XMLHttpRequest} xhr
|
|
30
30
|
*/
|
|
31
31
|
constructor(message, canRetry, xhr) {
|
|
32
|
-
super();
|
|
32
|
+
super(message);
|
|
33
33
|
// @see https://stackoverflow.com/questions/41102060/typescript-extending-error-class
|
|
34
34
|
Object.setPrototypeOf(this, CustomLoaderError.prototype);
|
|
35
35
|
this.name = "CustomLoaderError";
|
|
36
|
-
this.message = message;
|
|
37
36
|
this.canRetry = canRetry;
|
|
38
37
|
this.xhr = xhr;
|
|
39
38
|
}
|
|
@@ -26,7 +26,6 @@ export default class EncryptedMediaError extends Error {
|
|
|
26
26
|
readonly type: "ENCRYPTED_MEDIA_ERROR";
|
|
27
27
|
readonly code: IEncryptedMediaErrorCode;
|
|
28
28
|
readonly keyStatuses?: IEncryptedMediaErrorKeyStatusObject[];
|
|
29
|
-
message: string;
|
|
30
29
|
fatal: boolean;
|
|
31
30
|
private _originalMessage;
|
|
32
31
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encrypted_media_error.d.ts","sourceRoot":"","sources":["../../../src/errors/encrypted_media_error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAI9D;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,KAAK;IACpD,SAAgB,IAAI,EAAE,qBAAqB,CAAC;IAC5C,SAAgB,IAAI,EAAE,uBAAuB,CAAC;IAC9C,SAAgB,IAAI,EAAE,wBAAwB,CAAC;IAC/C,SAAgB,WAAW,CAAC,EAAE,mCAAmC,EAAE,CAAC;IAC7D,
|
|
1
|
+
{"version":3,"file":"encrypted_media_error.d.ts","sourceRoot":"","sources":["../../../src/errors/encrypted_media_error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAI9D;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,KAAK;IACpD,SAAgB,IAAI,EAAE,qBAAqB,CAAC;IAC5C,SAAgB,IAAI,EAAE,uBAAuB,CAAC;IAC9C,SAAgB,IAAI,EAAE,wBAAwB,CAAC;IAC/C,SAAgB,WAAW,CAAC,EAAE,mCAAmC,EAAE,CAAC;IAC7D,KAAK,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,gBAAgB,CAAS;IAEjC;;;OAGG;gBAED,IAAI,EAAE,yBAAyB,EAC/B,MAAM,EAAE,MAAM,EACd,kBAAkB,EAAE;QAAE,WAAW,EAAE,mCAAmC,EAAE,CAAA;KAAE;gBAG1E,IAAI,EAAE,IAAI,CAAC,wBAAwB,EAAE,yBAAyB,CAAC,EAC/D,MAAM,EAAE,MAAM;IAyBhB;;;;;OAKG;IACI,SAAS,IAAI,8BAA8B;CAQnD;AAED,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,qBAAqB,CAAC;IAC5B,IAAI,EAAE,wBAAwB,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EACP,KAAK,CAAC;QACJ,SAAS,EAAE,cAAc,CAAC;QAC1B,KAAK,EAAE,WAAW,CAAC;KACpB,CAAC,GACF,SAAS,CAAC;CACf"}
|
|
@@ -23,14 +23,13 @@ import errorMessage from "./error_message";
|
|
|
23
23
|
*/
|
|
24
24
|
export default class EncryptedMediaError extends Error {
|
|
25
25
|
constructor(code, reason, supplementaryInfos) {
|
|
26
|
-
super();
|
|
26
|
+
super(errorMessage(code, reason));
|
|
27
27
|
// @see https://stackoverflow.com/questions/41102060/typescript-extending-error-class
|
|
28
28
|
Object.setPrototypeOf(this, EncryptedMediaError.prototype);
|
|
29
29
|
this.name = "EncryptedMediaError";
|
|
30
30
|
this.type = ErrorTypes.ENCRYPTED_MEDIA_ERROR;
|
|
31
31
|
this.code = code;
|
|
32
32
|
this._originalMessage = reason;
|
|
33
|
-
this.message = errorMessage(this.code, reason);
|
|
34
33
|
this.fatal = false;
|
|
35
34
|
if (typeof (supplementaryInfos === null || supplementaryInfos === void 0 ? void 0 : supplementaryInfos.keyStatuses) === "string") {
|
|
36
35
|
this.keyStatuses = supplementaryInfos.keyStatuses;
|
|
@@ -25,7 +25,6 @@ type ICodeWithAdaptationType = "BUFFER_APPEND_ERROR" | "BUFFER_FULL_ERROR" | "NO
|
|
|
25
25
|
export default class MediaError extends Error {
|
|
26
26
|
readonly name: "MediaError";
|
|
27
27
|
readonly type: "MEDIA_ERROR";
|
|
28
|
-
readonly message: string;
|
|
29
28
|
readonly code: IMediaErrorCode;
|
|
30
29
|
readonly tracksInfo: ITaggedTrack[] | undefined;
|
|
31
30
|
fatal: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media_error.d.ts","sourceRoot":"","sources":["../../../src/errors/media_error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAIrD,KAAK,uBAAuB,GACxB,qBAAqB,GACrB,mBAAmB,GACnB,4BAA4B,GAC5B,oCAAoC,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,KAAK;IAC3C,SAAgB,IAAI,EAAE,YAAY,CAAC;IACnC,SAAgB,IAAI,EAAE,aAAa,CAAC;IACpC,SAAgB,
|
|
1
|
+
{"version":3,"file":"media_error.d.ts","sourceRoot":"","sources":["../../../src/errors/media_error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAIrD,KAAK,uBAAuB,GACxB,qBAAqB,GACrB,mBAAmB,GACnB,4BAA4B,GAC5B,oCAAoC,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,KAAK;IAC3C,SAAgB,IAAI,EAAE,YAAY,CAAC;IACnC,SAAgB,IAAI,EAAE,aAAa,CAAC;IACpC,SAAgB,IAAI,EAAE,eAAe,CAAC;IACtC,SAAgB,UAAU,EAAE,YAAY,EAAE,GAAG,SAAS,CAAC;IAChD,KAAK,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,gBAAgB,CAAS;IAEjC;;;;OAIG;gBAED,IAAI,EAAE,uBAAuB,EAC7B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE;QACP,MAAM,EAAE,YAAY,EAAE,GAAG,SAAS,CAAC;KACpC;gBAGD,IAAI,EAAE,OAAO,CAAC,eAAe,EAAE,uBAAuB,CAAC,EACvD,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EACJ;QACE,MAAM,CAAC,EAAE,SAAS,CAAC;KACpB,GACD,SAAS;IA0Bf;;;;;OAKG;IACI,SAAS,IAAI,qBAAqB;CAQ1C;AAED,uEAAuE;AACvE,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,eAAe,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,YAAY,EAAE,GAAG,SAAS,CAAC;CACpC"}
|
|
@@ -23,14 +23,13 @@ import errorMessage from "./error_message";
|
|
|
23
23
|
*/
|
|
24
24
|
export default class MediaError extends Error {
|
|
25
25
|
constructor(code, reason, context) {
|
|
26
|
-
super();
|
|
26
|
+
super(errorMessage(code, reason));
|
|
27
27
|
// @see https://stackoverflow.com/questions/41102060/typescript-extending-error-class
|
|
28
28
|
Object.setPrototypeOf(this, MediaError.prototype);
|
|
29
29
|
this.name = "MediaError";
|
|
30
30
|
this.type = ErrorTypes.MEDIA_ERROR;
|
|
31
31
|
this._originalMessage = reason;
|
|
32
32
|
this.code = code;
|
|
33
|
-
this.message = errorMessage(this.code, reason);
|
|
34
33
|
this.fatal = false;
|
|
35
34
|
if ((context === null || context === void 0 ? void 0 : context.tracks) !== undefined && (context === null || context === void 0 ? void 0 : context.tracks.length) > 0) {
|
|
36
35
|
this.tracksInfo = context.tracks;
|
|
@@ -24,7 +24,6 @@ import type { INetworkErrorCode, INetworkErrorType } from "./error_codes";
|
|
|
24
24
|
export default class NetworkError extends Error {
|
|
25
25
|
readonly name: "NetworkError";
|
|
26
26
|
readonly type: "NETWORK_ERROR";
|
|
27
|
-
readonly message: string;
|
|
28
27
|
readonly code: INetworkErrorCode;
|
|
29
28
|
readonly url: string;
|
|
30
29
|
readonly status: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network_error.d.ts","sourceRoot":"","sources":["../../../src/errors/network_error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAI1E;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,KAAK;IAC7C,SAAgB,IAAI,EAAE,cAAc,CAAC;IACrC,SAAgB,IAAI,EAAE,eAAe,CAAC;IACtC,SAAgB,
|
|
1
|
+
{"version":3,"file":"network_error.d.ts","sourceRoot":"","sources":["../../../src/errors/network_error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAI1E;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,KAAK;IAC7C,SAAgB,IAAI,EAAE,cAAc,CAAC;IACrC,SAAgB,IAAI,EAAE,eAAe,CAAC;IACtC,SAAgB,IAAI,EAAE,iBAAiB,CAAC;IACxC,SAAgB,GAAG,EAAE,MAAM,CAAC;IAC5B,SAAgB,MAAM,EAAE,MAAM,CAAC;IAC/B,SAAgB,SAAS,EAAE,iBAAiB,CAAC;IACtC,KAAK,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,UAAU,CAAe;IAEjC;;;OAGG;gBACS,IAAI,EAAE,iBAAiB,EAAE,SAAS,EAAE,YAAY;IAiB5D;;;;OAIG;IACH,WAAW,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO;IAO3C;;;;;OAKG;IACI,SAAS,IAAI,uBAAuB;CAO5C;AAED,yEAAyE;AACzE,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,cAAc,CAAC;IACrB,IAAI,EAAE,iBAAiB,CAAC;IACxB,SAAS,EAAE,uBAAuB,CAAC;CACpC"}
|
|
@@ -27,7 +27,7 @@ export default class NetworkError extends Error {
|
|
|
27
27
|
* @param {Error} baseError
|
|
28
28
|
*/
|
|
29
29
|
constructor(code, baseError) {
|
|
30
|
-
super();
|
|
30
|
+
super(errorMessage(code, baseError.message));
|
|
31
31
|
// @see https://stackoverflow.com/questions/41102060/typescript-extending-error-class
|
|
32
32
|
Object.setPrototypeOf(this, NetworkError.prototype);
|
|
33
33
|
this.name = "NetworkError";
|
|
@@ -37,7 +37,6 @@ export default class NetworkError extends Error {
|
|
|
37
37
|
this.errorType = baseError.type;
|
|
38
38
|
this._baseError = baseError;
|
|
39
39
|
this.code = code;
|
|
40
|
-
this.message = errorMessage(this.code, baseError.message);
|
|
41
40
|
this.fatal = false;
|
|
42
41
|
}
|
|
43
42
|
/**
|
|
@@ -21,7 +21,6 @@ import type { IOtherErrorCode } from "./error_codes";
|
|
|
21
21
|
export default class OtherError extends Error {
|
|
22
22
|
readonly name: "OtherError";
|
|
23
23
|
readonly type: "OTHER_ERROR";
|
|
24
|
-
readonly message: string;
|
|
25
24
|
readonly code: IOtherErrorCode;
|
|
26
25
|
fatal: boolean;
|
|
27
26
|
private _originalMessage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"other_error.d.ts","sourceRoot":"","sources":["../../../src/errors/other_error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAIrD;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,KAAK;IAC3C,SAAgB,IAAI,EAAE,YAAY,CAAC;IACnC,SAAgB,IAAI,EAAE,aAAa,CAAC;IACpC,SAAgB,
|
|
1
|
+
{"version":3,"file":"other_error.d.ts","sourceRoot":"","sources":["../../../src/errors/other_error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAIrD;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,KAAK;IAC3C,SAAgB,IAAI,EAAE,YAAY,CAAC;IACnC,SAAgB,IAAI,EAAE,aAAa,CAAC;IACpC,SAAgB,IAAI,EAAE,eAAe,CAAC;IAC/B,KAAK,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,gBAAgB,CAAS;IAEjC;;;OAGG;gBACS,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM;IAajD;;;;;OAKG;IACI,SAAS,IAAI,qBAAqB;CAG1C;AAED,wEAAwE;AACxE,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,eAAe,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -25,13 +25,12 @@ export default class OtherError extends Error {
|
|
|
25
25
|
* @param {string} reason
|
|
26
26
|
*/
|
|
27
27
|
constructor(code, reason) {
|
|
28
|
-
super();
|
|
28
|
+
super(errorMessage(code, reason));
|
|
29
29
|
// @see https://stackoverflow.com/questions/41102060/typescript-extending-error-class
|
|
30
30
|
Object.setPrototypeOf(this, OtherError.prototype);
|
|
31
31
|
this.name = "OtherError";
|
|
32
32
|
this.type = ErrorTypes.OTHER_ERROR;
|
|
33
33
|
this.code = code;
|
|
34
|
-
this.message = errorMessage(this.code, reason);
|
|
35
34
|
this.fatal = false;
|
|
36
35
|
this._originalMessage = reason;
|
|
37
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source_buffer_error.d.ts","sourceRoot":"","sources":["../../../src/errors/source_buffer_error.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,KAAK;IAClD,SAAgB,IAAI,EAAE,mBAAmB,CAAC;IAC1C,SAAgB,SAAS,EAAE,MAAM,CAAC;IAClC,SAAgB,
|
|
1
|
+
{"version":3,"file":"source_buffer_error.d.ts","sourceRoot":"","sources":["../../../src/errors/source_buffer_error.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,KAAK;IAClD,SAAgB,IAAI,EAAE,mBAAmB,CAAC;IAC1C,SAAgB,SAAS,EAAE,MAAM,CAAC;IAClC,SAAgB,YAAY,EAAE,OAAO,CAAC;IAEtC;;;;;OAKG;gBACS,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO;IAUrE;;;;;OAKG;IACI,SAAS,IAAI,4BAA4B;IAQhD;;;;OAIG;IACI,QAAQ,IAAI,MAAM;CAG1B;AAED,8EAA8E;AAC9E,MAAM,WAAW,4BAA4B;IAC3C,qCAAqC;IACrC,SAAS,EAAE,mBAAmB,CAAC;IAC/B,+CAA+C;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,oEAAoE;IACpE,YAAY,EAAE,OAAO,CAAC;CACvB"}
|
|
@@ -11,12 +11,11 @@ export default class SourceBufferError extends Error {
|
|
|
11
11
|
* that the `SourceBuffer` was full.
|
|
12
12
|
*/
|
|
13
13
|
constructor(errorName, message, isBufferFull) {
|
|
14
|
-
super();
|
|
14
|
+
super(message);
|
|
15
15
|
// @see https://stackoverflow.com/questions/41102060/typescript-extending-error-class
|
|
16
16
|
Object.setPrototypeOf(this, SourceBufferError.prototype);
|
|
17
17
|
this.name = "SourceBufferError";
|
|
18
18
|
this.errorName = errorName;
|
|
19
|
-
this.message = message;
|
|
20
19
|
this.isBufferFull = isBufferFull;
|
|
21
20
|
}
|
|
22
21
|
/**
|
|
@@ -8,7 +8,6 @@ type IWorkerInitializationErrorCode = "UNKNOWN_ERROR" | "SETUP_ERROR" | "INCOMPA
|
|
|
8
8
|
export default class WorkerInitializationError extends Error {
|
|
9
9
|
readonly name: "WorkerInitializationError";
|
|
10
10
|
readonly type: "WORKER_INITIALIZATION_ERROR";
|
|
11
|
-
readonly message: string;
|
|
12
11
|
readonly code: IWorkerInitializationErrorCode;
|
|
13
12
|
/**
|
|
14
13
|
* @param {string} code
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker_initialization_error.d.ts","sourceRoot":"","sources":["../../../src/errors/worker_initialization_error.ts"],"names":[],"mappings":"AAEA,KAAK,8BAA8B,GAC/B,eAAe,GACf,aAAa,GACb,oBAAoB,CAAC;AAEzB;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,yBAA0B,SAAQ,KAAK;IAC1D,SAAgB,IAAI,EAAE,2BAA2B,CAAC;IAClD,SAAgB,IAAI,EAAE,6BAA6B,CAAC;IACpD,SAAgB,
|
|
1
|
+
{"version":3,"file":"worker_initialization_error.d.ts","sourceRoot":"","sources":["../../../src/errors/worker_initialization_error.ts"],"names":[],"mappings":"AAEA,KAAK,8BAA8B,GAC/B,eAAe,GACf,aAAa,GACb,oBAAoB,CAAC;AAEzB;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,yBAA0B,SAAQ,KAAK;IAC1D,SAAgB,IAAI,EAAE,2BAA2B,CAAC;IAClD,SAAgB,IAAI,EAAE,6BAA6B,CAAC;IACpD,SAAgB,IAAI,EAAE,8BAA8B,CAAC;IAErD;;;OAGG;gBACS,IAAI,EAAE,8BAA8B,EAAE,OAAO,EAAE,MAAM;CASlE"}
|
|
@@ -11,12 +11,11 @@ export default class WorkerInitializationError extends Error {
|
|
|
11
11
|
* @param {string} message
|
|
12
12
|
*/
|
|
13
13
|
constructor(code, message) {
|
|
14
|
-
super();
|
|
14
|
+
super(errorMessage(code, message));
|
|
15
15
|
// @see https://stackoverflow.com/questions/41102060/typescript-extending-error-class
|
|
16
16
|
Object.setPrototypeOf(this, WorkerInitializationError.prototype);
|
|
17
17
|
this.name = "WorkerInitializationError";
|
|
18
18
|
this.type = "WORKER_INITIALIZATION_ERROR";
|
|
19
19
|
this.code = code;
|
|
20
|
-
this.message = errorMessage(this.code, message);
|
|
21
20
|
}
|
|
22
21
|
}
|
package/dist/es2017/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader_error.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"video_thumbnail_loader_error.d.ts","sourceRoot":"","sources":["../../../../../src/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader_error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"video_thumbnail_loader_error.d.ts","sourceRoot":"","sources":["../../../../../src/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader_error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,MAAM,CAAC,OAAO,OAAO,yBAA0B,SAAQ,KAAK;IAC1D,SAAgB,IAAI,EAAE,2BAA2B,CAAC;IAClD,SAAgB,IAAI,EAAE,MAAM,CAAC;IAE7B;;;OAGG;gBACS,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAM1C"}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import errorMessage from "../../../errors/error_message";
|
|
16
17
|
// Returned error when rejecting
|
|
17
18
|
export default class VideoThumbnailLoaderError extends Error {
|
|
18
19
|
/**
|
|
@@ -20,10 +21,9 @@ export default class VideoThumbnailLoaderError extends Error {
|
|
|
20
21
|
* @param {string} message
|
|
21
22
|
*/
|
|
22
23
|
constructor(code, message) {
|
|
23
|
-
super();
|
|
24
|
+
super(errorMessage(code, message));
|
|
24
25
|
Object.setPrototypeOf(this, VideoThumbnailLoaderError.prototype);
|
|
25
26
|
this.name = "VideoThumbnailLoaderError";
|
|
26
27
|
this.code = code;
|
|
27
|
-
this.message = message;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -98,8 +98,8 @@ export default class SegmentSinkGraph {
|
|
|
98
98
|
return;
|
|
99
99
|
}
|
|
100
100
|
const currentRangesScaled = scaleSegments(inventory, minimumPosition, maximumPosition);
|
|
101
|
-
for (
|
|
102
|
-
this._paintRange(
|
|
101
|
+
for (const currentRange of currentRangesScaled) {
|
|
102
|
+
this._paintRange(currentRange, width, height);
|
|
103
103
|
}
|
|
104
104
|
if (currentTime !== undefined) {
|
|
105
105
|
paintCurrentPosition(currentTime, minimumPosition, maximumPosition, this._canvasCtxt, width, height);
|
|
@@ -157,12 +157,12 @@ function paintCurrentPosition(position, minimumPosition, maximumPosition, canvas
|
|
|
157
157
|
* @returns {Array.<Object>}
|
|
158
158
|
*/
|
|
159
159
|
function scaleSegments(bufferedData, minimumPosition, maximumPosition) {
|
|
160
|
+
var _a, _b;
|
|
160
161
|
const scaledSegments = [];
|
|
161
162
|
const wholeDuration = maximumPosition - minimumPosition;
|
|
162
|
-
for (
|
|
163
|
-
const
|
|
164
|
-
const
|
|
165
|
-
const end = info.bufferedEnd === undefined ? info.end : info.bufferedEnd;
|
|
163
|
+
for (const info of bufferedData) {
|
|
164
|
+
const start = (_a = info.bufferedStart) !== null && _a !== void 0 ? _a : info.start;
|
|
165
|
+
const end = (_b = info.bufferedEnd) !== null && _b !== void 0 ? _b : info.end;
|
|
166
166
|
if (end > minimumPosition && start < maximumPosition) {
|
|
167
167
|
const startPoint = Math.max(start - minimumPosition, 0);
|
|
168
168
|
const endPoint = Math.min(end - minimumPosition, maximumPosition);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segment_buffer_content.d.ts","sourceRoot":"","sources":["../../../../../../src/main_thread/api/debug/modules/segment_buffer_content.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAQ1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAU7C,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAC5C,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,WAAW,EACvB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,WAAW,EACtB,YAAY,EAAE,kBAAkB,GAC/B,WAAW,
|
|
1
|
+
{"version":3,"file":"segment_buffer_content.d.ts","sourceRoot":"","sources":["../../../../../../src/main_thread/api/debug/modules/segment_buffer_content.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAQ1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAU7C,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAC5C,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,WAAW,EACvB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,WAAW,EACtB,YAAY,EAAE,kBAAkB,GAC/B,WAAW,CAmHb"}
|
|
@@ -75,8 +75,7 @@ export default function createSegmentSinkGraph(instance, bufferType, title, pare
|
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
77
77
|
currentRangeRepInfoElt.innerHTML = "";
|
|
78
|
-
for (
|
|
79
|
-
const rangeInfo = inventory[i];
|
|
78
|
+
for (const rangeInfo of inventory) {
|
|
80
79
|
const { bufferedStart, bufferedEnd, infos } = rangeInfo;
|
|
81
80
|
if (bufferedStart !== undefined &&
|
|
82
81
|
bufferedEnd !== undefined &&
|
|
@@ -133,7 +133,7 @@ class Player extends EventEmitter {
|
|
|
133
133
|
// Workaround to support Firefox autoplay on FF 42.
|
|
134
134
|
// See: https://bugzilla.mozilla.org/show_bug.cgi?id=1194624
|
|
135
135
|
videoElement.preload = "auto";
|
|
136
|
-
this.version = /* PLAYER_VERSION */ "4.1.0
|
|
136
|
+
this.version = /* PLAYER_VERSION */ "4.1.0";
|
|
137
137
|
this.log = log;
|
|
138
138
|
this.state = "STOPPED";
|
|
139
139
|
this.videoElement = videoElement;
|
|
@@ -2378,5 +2378,5 @@ class Player extends EventEmitter {
|
|
|
2378
2378
|
* Use of a WeakSet ensure the object is garbage collected if it's not used anymore.
|
|
2379
2379
|
*/
|
|
2380
2380
|
Player._priv_currentlyUsedVideoElements = new WeakSet();
|
|
2381
|
-
Player.version = /* PLAYER_VERSION */ "4.1.0
|
|
2381
|
+
Player.version = /* PLAYER_VERSION */ "4.1.0";
|
|
2382
2382
|
export default Player;
|
|
@@ -226,7 +226,7 @@ async function updateSessionWithMessage(session, message) {
|
|
|
226
226
|
*/
|
|
227
227
|
export class BlacklistedSessionError extends Error {
|
|
228
228
|
constructor(sessionError) {
|
|
229
|
-
super();
|
|
229
|
+
super(sessionError.message);
|
|
230
230
|
// @see https://stackoverflow.com/questions/41102060/typescript-extending-error-class
|
|
231
231
|
Object.setPrototypeOf(this, BlacklistedSessionError.prototype);
|
|
232
232
|
this.sessionError = sessionError;
|
|
@@ -239,7 +239,7 @@ export class BlacklistedSessionError extends Error {
|
|
|
239
239
|
*/
|
|
240
240
|
export class GetLicenseTimeoutError extends Error {
|
|
241
241
|
constructor(message) {
|
|
242
|
-
super();
|
|
242
|
+
super(message);
|
|
243
243
|
// @see https://stackoverflow.com/questions/41102060/typescript-extending-error-class
|
|
244
244
|
Object.setPrototypeOf(this, BlacklistedSessionError.prototype);
|
|
245
245
|
this.message = message;
|
|
@@ -33,7 +33,7 @@ export class DecommissionedSessionError extends Error {
|
|
|
33
33
|
* current MediaKeySession. Should be used for reporting purposes.
|
|
34
34
|
*/
|
|
35
35
|
constructor(reason) {
|
|
36
|
-
super();
|
|
36
|
+
super(reason.message);
|
|
37
37
|
// @see https://stackoverflow.com/questions/41102060/typescript-extending-error-class
|
|
38
38
|
Object.setPrototypeOf(this, DecommissionedSessionError.prototype);
|
|
39
39
|
this.reason = reason;
|
|
@@ -1359,8 +1359,7 @@ function updateManifestCodecSupport(manifest) {
|
|
|
1359
1359
|
if (codecs.length === 0) {
|
|
1360
1360
|
codecs = [""];
|
|
1361
1361
|
}
|
|
1362
|
-
for (
|
|
1363
|
-
const codec = codecs[codecIdx];
|
|
1362
|
+
for (const codec of codecs) {
|
|
1364
1363
|
isSupported = checkCodecSupport(mimeType, codec);
|
|
1365
1364
|
if (isSupported) {
|
|
1366
1365
|
r.codecs = [codec];
|
|
@@ -245,14 +245,14 @@ function findSeekableDiscontinuity(discontinuitiesStore, manifest, stalledPositi
|
|
|
245
245
|
return null;
|
|
246
246
|
}
|
|
247
247
|
let maxDiscontinuityEnd = null;
|
|
248
|
-
for (
|
|
249
|
-
const { period } =
|
|
248
|
+
for (const discontinuityInfo of discontinuitiesStore) {
|
|
249
|
+
const { period } = discontinuityInfo;
|
|
250
250
|
if (period.start > stalledPosition) {
|
|
251
251
|
return maxDiscontinuityEnd;
|
|
252
252
|
}
|
|
253
253
|
let discontinuityEnd;
|
|
254
254
|
if (period.end === undefined || period.end > stalledPosition) {
|
|
255
|
-
const { discontinuity, position } =
|
|
255
|
+
const { discontinuity, position } = discontinuityInfo;
|
|
256
256
|
const { start, end } = discontinuity;
|
|
257
257
|
const discontinuityLowerLimit = start !== null && start !== void 0 ? start : position;
|
|
258
258
|
if (stalledPosition >= discontinuityLowerLimit - EPSILON) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refresh_scheduled_events_list.d.ts","sourceRoot":"","sources":["../../../../../../src/main_thread/init/utils/stream_events_emitter/refresh_scheduled_events_list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,KAAK,EAAE,4BAA4B,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEjF;;;;;GAKG;AACH,iBAAS,0BAA0B,CACjC,kBAAkB,EAAE,KAAK,CAAC,mBAAmB,GAAG,4BAA4B,CAAC,EAC7E,QAAQ,EAAE,iBAAiB,GAC1B,KAAK,CAAC,mBAAmB,GAAG,4BAA4B,CAAC,
|
|
1
|
+
{"version":3,"file":"refresh_scheduled_events_list.d.ts","sourceRoot":"","sources":["../../../../../../src/main_thread/init/utils/stream_events_emitter/refresh_scheduled_events_list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,KAAK,EAAE,4BAA4B,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEjF;;;;;GAKG;AACH,iBAAS,0BAA0B,CACjC,kBAAkB,EAAE,KAAK,CAAC,mBAAmB,GAAG,4BAA4B,CAAC,EAC7E,QAAQ,EAAE,iBAAiB,GAC1B,KAAK,CAAC,mBAAmB,GAAG,4BAA4B,CAAC,CA6D3D;AAED,eAAe,0BAA0B,CAAC"}
|
package/dist/es2017/main_thread/init/utils/stream_events_emitter/refresh_scheduled_events_list.js
CHANGED
|
@@ -23,12 +23,10 @@ import areSameStreamEvents from "./are_same_stream_events";
|
|
|
23
23
|
function refreshScheduledEventsList(oldScheduledEvents, manifest) {
|
|
24
24
|
const scheduledEvents = [];
|
|
25
25
|
const { periods } = manifest;
|
|
26
|
-
for (
|
|
27
|
-
const period = periods[i];
|
|
26
|
+
for (const period of periods) {
|
|
28
27
|
const { streamEvents } = period;
|
|
29
28
|
streamEvents.forEach(({ start, end, id, data }) => {
|
|
30
|
-
for (
|
|
31
|
-
const currentScheduledEvent = oldScheduledEvents[j];
|
|
29
|
+
for (const currentScheduledEvent of oldScheduledEvents) {
|
|
32
30
|
if (areSameStreamEvents(currentScheduledEvent, { id, start, end })) {
|
|
33
31
|
scheduledEvents.push(currentScheduledEvent);
|
|
34
32
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"html_text_displayer.d.ts","sourceRoot":"","sources":["../../../../../src/main_thread/text_displayer/html/html_text_displayer.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAKpD,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAqCnE;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAkB,YAAW,cAAc;IAC9D;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAmB;IAEjD,oEAAoE;IACpE,OAAO,CAAC,2BAA2B,CAAgB;IAEnD,8CAA8C;IAC9C,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAc;IAEhD,iCAAiC;IACjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;IAE7C;;;;OAIG;IACH,OAAO,CAAC,oBAAoB,CAAgB;IAE5C,+CAA+C;IAC/C,OAAO,CAAC,YAAY,CAQjB;IAEH,iDAAiD;IACjD,OAAO,CAAC,SAAS,CAAmB;IAEpC;;;;;;OAMG;IACH,OAAO,CAAC,iBAAiB,CAAU;IAEnC;;;OAGG;gBACS,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,WAAW;IAazE;;;;OAIG;IACI,YAAY,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,EAAE;IAkFxD;;;;;OAKG;IACI,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE;IAazD;;;OAGG;IACI,iBAAiB,IAAI,MAAM,EAAE;IAI7B,KAAK,IAAI,IAAI;IAMb,IAAI,IAAI,IAAI;IAYnB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAU3B;;;OAGG;IACH,OAAO,CAAC,YAAY;
|
|
1
|
+
{"version":3,"file":"html_text_displayer.d.ts","sourceRoot":"","sources":["../../../../../src/main_thread/text_displayer/html/html_text_displayer.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAKpD,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAqCnE;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAkB,YAAW,cAAc;IAC9D;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAmB;IAEjD,oEAAoE;IACpE,OAAO,CAAC,2BAA2B,CAAgB;IAEnD,8CAA8C;IAC9C,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAc;IAEhD,iCAAiC;IACjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;IAE7C;;;;OAIG;IACH,OAAO,CAAC,oBAAoB,CAAgB;IAE5C,+CAA+C;IAC/C,OAAO,CAAC,YAAY,CAQjB;IAEH,iDAAiD;IACjD,OAAO,CAAC,SAAS,CAAmB;IAEpC;;;;;;OAMG;IACH,OAAO,CAAC,iBAAiB,CAAU;IAEnC;;;OAGG;gBACS,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,WAAW;IAazE;;;;OAIG;IACI,YAAY,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,EAAE;IAkFxD;;;;;OAKG;IACI,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE;IAazD;;;OAGG;IACI,iBAAiB,IAAI,MAAM,EAAE;IAI7B,KAAK,IAAI,IAAI;IAMb,IAAI,IAAI,IAAI;IAYnB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAU3B;;;OAGG;IACH,OAAO,CAAC,YAAY;IA0DpB;;;;OAIG;IACH,OAAO,CAAC,oBAAoB;IA2C5B;;;OAGG;IACH,OAAO,CAAC,gBAAgB;CAoBzB;AAED,uEAAuE;AACvE,MAAM,WAAW,4BAA4B;IAC3C,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,2DAA2D;IAC3D,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,0DAA0D;IAC1D,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B"}
|
|
@@ -180,8 +180,8 @@ export default class HTMLTextDisplayer {
|
|
|
180
180
|
_disableCurrentCues() {
|
|
181
181
|
this._sizeUpdateCanceller.cancel();
|
|
182
182
|
if (this._currentCues.length > 0) {
|
|
183
|
-
for (
|
|
184
|
-
safelyRemoveChild(this._textTrackElement,
|
|
183
|
+
for (const cue of this._currentCues) {
|
|
184
|
+
safelyRemoveChild(this._textTrackElement, cue.element);
|
|
185
185
|
}
|
|
186
186
|
this._currentCues = [];
|
|
187
187
|
}
|
|
@@ -199,12 +199,11 @@ export default class HTMLTextDisplayer {
|
|
|
199
199
|
// Remove and re-display everything
|
|
200
200
|
// TODO More intelligent handling
|
|
201
201
|
this._sizeUpdateCanceller.cancel();
|
|
202
|
-
for (
|
|
203
|
-
safelyRemoveChild(this._textTrackElement,
|
|
202
|
+
for (const cue of this._currentCues) {
|
|
203
|
+
safelyRemoveChild(this._textTrackElement, cue.element);
|
|
204
204
|
}
|
|
205
205
|
this._currentCues = [];
|
|
206
|
-
for (
|
|
207
|
-
const element = elements[i];
|
|
206
|
+
for (const element of elements) {
|
|
208
207
|
const resolution = getElementResolution(element);
|
|
209
208
|
this._currentCues.push({ element, resolution });
|
|
210
209
|
this._textTrackElement.appendChild(element);
|
|
@@ -217,8 +216,8 @@ export default class HTMLTextDisplayer {
|
|
|
217
216
|
// update propertionally-sized elements periodically
|
|
218
217
|
const heightWidthRef = onHeightWidthChange(this._textTrackElement, TEXT_TRACK_SIZE_CHECKS_INTERVAL, this._sizeUpdateCanceller.signal);
|
|
219
218
|
heightWidthRef.onUpdate(({ height, width }) => {
|
|
220
|
-
for (
|
|
221
|
-
const { resolution, element } =
|
|
219
|
+
for (const cue of proportionalCues) {
|
|
220
|
+
const { resolution, element } = cue;
|
|
222
221
|
updateProportionalElements(height, width, resolution, element);
|
|
223
222
|
}
|
|
224
223
|
}, {
|
|
@@ -56,9 +56,9 @@ export default class TextTrackCuesStore {
|
|
|
56
56
|
const segment = cuesBuffer[cueIdx];
|
|
57
57
|
if (time < segment.end && time >= segment.start) {
|
|
58
58
|
const cues = segment.cues;
|
|
59
|
-
for (
|
|
60
|
-
if (time >=
|
|
61
|
-
ret.push(
|
|
59
|
+
for (const cue of cues) {
|
|
60
|
+
if (time >= cue.start && time < cue.end) {
|
|
61
|
+
ret.push(cue.element);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
// first or last IHTMLCue in a group can have a slighlty different start
|
|
@@ -66,10 +66,10 @@ export default class TextTrackCuesStore {
|
|
|
66
66
|
// approximation.
|
|
67
67
|
// Add a tolerance of 1ms to fix this issue
|
|
68
68
|
if (ret.length === 0 && cues.length > 0) {
|
|
69
|
-
for (
|
|
70
|
-
if (areNearlyEqual(time,
|
|
71
|
-
areNearlyEqual(time,
|
|
72
|
-
ret.push(
|
|
69
|
+
for (const cue of cues) {
|
|
70
|
+
if (areNearlyEqual(time, cue.start, DELTA_CUES_GROUP) ||
|
|
71
|
+
areNearlyEqual(time, cue.end, DELTA_CUES_GROUP)) {
|
|
72
|
+
ret.push(cue.element);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
}
|
|
@@ -102,8 +102,8 @@ export default class NativeTextDisplayer {
|
|
|
102
102
|
this._removeData(firstCue.startTime, +Infinity);
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
-
for (
|
|
106
|
-
this._track.addCue(
|
|
105
|
+
for (const cue of cues) {
|
|
106
|
+
this._track.addCue(cue);
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
this._buffered.insert(start, end);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/parsers/containers/isobmff/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAiBH,OAAO,EAAE,8BAA8B,EAAE,MAAM,OAAO,CAAC;AAIvD,yCAAyC;AACzC,MAAM,WAAW,gBAAgB;IAC/B,+DAA+D;IAC/D,QAAQ,EAAE,MAAM,CAAC;IACjB,iDAAiD;IACjD,WAAW,EAAE,UAAU,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,KAAK;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,aAAa,EAAE,MAAM,CAAC;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,UAAU,CAAC;CACzB;AAED,8CAA8C;AAC9C,MAAM,WAAW,YAAY;IAC3B,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,QAAQ,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACzB;AAED;;;;;;;;GAQG;AACH,iBAAS,mBAAmB,CAC1B,GAAG,EAAE,UAAU,EACf,wBAAwB,EAAE,MAAM,GAC/B,YAAY,EAAE,GAAG,IAAI,CAgFvB;AAED;;;;;;;;;GASG;AACH,iBAAS,0BAA0B,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAiB1E;AAyCD;;;;;;;GAOG;AACH,iBAAS,mBAAmB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAsEnE;AAED;;;;;;;GAOG;AACH,iBAAS,gBAAgB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAoBhE;AAsBD;;;;;;GAMG;AACH,iBAAS,SAAS,CAAC,GAAG,EAAE,UAAU,EAAE,QAAQ,EAAE,gBAAgB,EAAE,GAAG,UAAU,CAkB5E;AAED;;;;;;;;;;;GAWG;AACH,iBAAS,eAAe,CAAC,GAAG,EAAE,UAAU,GAAG,UAAU,CAmCpD;AAED;;;;GAIG;AACH,iBAAS,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,KAAK,EAAE,GAAG,SAAS,CAyD/D;AAED;;;GAGG;AACH,iBAAS,uBAAuB,CAAC,OAAO,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/parsers/containers/isobmff/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAiBH,OAAO,EAAE,8BAA8B,EAAE,MAAM,OAAO,CAAC;AAIvD,yCAAyC;AACzC,MAAM,WAAW,gBAAgB;IAC/B,+DAA+D;IAC/D,QAAQ,EAAE,MAAM,CAAC;IACjB,iDAAiD;IACjD,WAAW,EAAE,UAAU,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,KAAK;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,aAAa,EAAE,MAAM,CAAC;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,UAAU,CAAC;CACzB;AAED,8CAA8C;AAC9C,MAAM,WAAW,YAAY;IAC3B,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,QAAQ,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACzB;AAED;;;;;;;;GAQG;AACH,iBAAS,mBAAmB,CAC1B,GAAG,EAAE,UAAU,EACf,wBAAwB,EAAE,MAAM,GAC/B,YAAY,EAAE,GAAG,IAAI,CAgFvB;AAED;;;;;;;;;GASG;AACH,iBAAS,0BAA0B,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAiB1E;AAyCD;;;;;;;GAOG;AACH,iBAAS,mBAAmB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAsEnE;AAED;;;;;;;GAOG;AACH,iBAAS,gBAAgB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAoBhE;AAsBD;;;;;;GAMG;AACH,iBAAS,SAAS,CAAC,GAAG,EAAE,UAAU,EAAE,QAAQ,EAAE,gBAAgB,EAAE,GAAG,UAAU,CAkB5E;AAED;;;;;;;;;;;GAWG;AACH,iBAAS,eAAe,CAAC,GAAG,EAAE,UAAU,GAAG,UAAU,CAmCpD;AAED;;;;GAIG;AACH,iBAAS,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,KAAK,EAAE,GAAG,SAAS,CAyD/D;AAED;;;GAGG;AACH,iBAAS,uBAAuB,CAAC,OAAO,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI,CAsDvE;AAED,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,8BAA8B,EAC9B,0BAA0B,EAC1B,mBAAmB,EACnB,mBAAmB,EACnB,SAAS,EACT,eAAe,EACf,cAAc,GACf,CAAC"}
|
|
@@ -451,6 +451,8 @@ function getKeyIdFromInitSegment(segment) {
|
|
|
451
451
|
if (tenc === null || tenc.byteLength < 24) {
|
|
452
452
|
return null;
|
|
453
453
|
}
|
|
454
|
-
|
|
454
|
+
const keyId = tenc.subarray(8, 24);
|
|
455
|
+
// Zero-filled keyId should only be valid for unencrypted content
|
|
456
|
+
return keyId.every((b) => b === 0) ? null : keyId;
|
|
455
457
|
}
|
|
456
458
|
export { getKeyIdFromInitSegment, getMDHDTimescale, getPlayReadyKIDFromPrivateData, getTrackFragmentDecodeTime, getDurationFromTrun, getSegmentsFromSidx, patchPssh, updateBoxLength, parseEmsgBoxes, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../../src/parsers/manifest/dash/fast-js-parser/node_parsers/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH,OAAO,EAAmB,KAAK,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAMvD;;;;;;;;;;;;GAYG;AACH,iBAAS,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC,OAAO,EAAE,QAAQ,GAAG,IAAI,CAAC,CAWlF;AAED;;;;;;;;;;;;GAYG;AACH,iBAAS,eAAe,CACtB,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM,GAClB,CAAC,MAAM,GAAG,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC,CASlC;AAED;;;;;;;;;;;;GAYG;AACH,iBAAS,aAAa,CACpB,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM,GAClB,CAAC,MAAM,GAAG,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC,CAUlC;AAED;;;;;;;;;;;;GAYG;AACH,iBAAS,iBAAiB,CACxB,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM,GAClB,CAAC,OAAO,GAAG,MAAM,GAAG,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC,CAe5C;AAED;;;;;;;;;;;;GAYG;AACH,iBAAS,aAAa,CACpB,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM,GAClB,CAAC,MAAM,GAAG,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC,CASlC;AAED;;;;;;;;;;;;GAYG;AACH,iBAAS,aAAa,CACpB,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM,GAClB,CAAC,MAAM,GAAG,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC,CAsBlC;AAED;;;;;;;;;;;;GAYG;AACH,iBAAS,cAAc,CACrB,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM,GAClB,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC,CAU5C;AAED;;;;;;;;;;;;GAYG;AACH,iBAAS,WAAW,CAClB,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM,GAClB,CAAC,UAAU,GAAG,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC,CAStC;AAED;;;;;;;GAOG;AACH,iBAAS,uBAAuB,CAC9B,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM,GAClB,CAAC,MAAM,GAAG,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC,CAOlC;AAED;;;GAGG;AACH,iBAAS,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAmB1C;AAED;;;;;;;GAOG;AACH,iBAAS,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,SAWzC,MAAM;WAMF,MAAM,CAAC;oBAEL,MAAM,eACA,MAAM,KAChB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC;cAC/B,MAAM;MAEjB,IAAI,CAWR;AAED;;;;GAIG;AACH,cAAM,QAAS,SAAQ,KAAK;IAC1B,SAAgB,IAAI,EAAE,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../../src/parsers/manifest/dash/fast-js-parser/node_parsers/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH,OAAO,EAAmB,KAAK,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAMvD;;;;;;;;;;;;GAYG;AACH,iBAAS,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC,OAAO,EAAE,QAAQ,GAAG,IAAI,CAAC,CAWlF;AAED;;;;;;;;;;;;GAYG;AACH,iBAAS,eAAe,CACtB,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM,GAClB,CAAC,MAAM,GAAG,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC,CASlC;AAED;;;;;;;;;;;;GAYG;AACH,iBAAS,aAAa,CACpB,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM,GAClB,CAAC,MAAM,GAAG,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC,CAUlC;AAED;;;;;;;;;;;;GAYG;AACH,iBAAS,iBAAiB,CACxB,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM,GAClB,CAAC,OAAO,GAAG,MAAM,GAAG,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC,CAe5C;AAED;;;;;;;;;;;;GAYG;AACH,iBAAS,aAAa,CACpB,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM,GAClB,CAAC,MAAM,GAAG,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC,CASlC;AAED;;;;;;;;;;;;GAYG;AACH,iBAAS,aAAa,CACpB,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM,GAClB,CAAC,MAAM,GAAG,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC,CAsBlC;AAED;;;;;;;;;;;;GAYG;AACH,iBAAS,cAAc,CACrB,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM,GAClB,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC,CAU5C;AAED;;;;;;;;;;;;GAYG;AACH,iBAAS,WAAW,CAClB,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM,GAClB,CAAC,UAAU,GAAG,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC,CAStC;AAED;;;;;;;GAOG;AACH,iBAAS,uBAAuB,CAC9B,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM,GAClB,CAAC,MAAM,GAAG,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC,CAOlC;AAED;;;GAGG;AACH,iBAAS,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAmB1C;AAED;;;;;;;GAOG;AACH,iBAAS,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,SAWzC,MAAM;WAMF,MAAM,CAAC;oBAEL,MAAM,eACA,MAAM,KAChB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC;cAC/B,MAAM;MAEjB,IAAI,CAWR;AAED;;;;GAIG;AACH,cAAM,QAAS,SAAQ,KAAK;IAC1B,SAAgB,IAAI,EAAE,UAAU,CAAC;IAEjC;;OAEG;gBACS,OAAO,EAAE,MAAM;CAO5B;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM,CAEpE;AAED,OAAO,EACL,QAAQ,EACR,WAAW,EACX,WAAW,EACX,YAAY,EACZ,cAAc,EACd,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,uBAAuB,EACvB,aAAa,EACb,eAAe,EACf,WAAW,GACZ,CAAC"}
|