rx-player 4.2.0-dev.2024091600 → 4.2.0-dev.2024100200
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 +20 -11
- 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/compat/eme/close_session.js +2 -2
- package/dist/commonjs/compat/eme/load_session.js +2 -2
- package/dist/commonjs/compat/patch_webkit_source_buffer.d.ts.map +1 -1
- package/dist/commonjs/compat/patch_webkit_source_buffer.js +0 -3
- package/dist/commonjs/config.d.ts +7 -156
- package/dist/commonjs/config.d.ts.map +1 -1
- package/dist/commonjs/config.js +50 -3
- package/dist/commonjs/core/fetchers/manifest/manifest_fetcher.js +2 -2
- package/dist/commonjs/core/fetchers/segment/segment_fetcher.js +2 -2
- package/dist/commonjs/core/fetchers/utils/schedule_request.js +2 -2
- package/dist/commonjs/core/main/worker/worker_main.d.ts.map +1 -1
- package/dist/commonjs/core/main/worker/worker_main.js +7 -0
- package/dist/commonjs/core/segment_sinks/garbage_collector.js +2 -2
- package/dist/commonjs/core/segment_sinks/implementations/audio_video/audio_video_segment_buffer.js +2 -2
- package/dist/commonjs/core/segment_sinks/implementations/text/text_segment_buffer.js +2 -2
- package/dist/commonjs/core/stream/adaptation/adaptation_stream.d.ts.map +1 -1
- package/dist/commonjs/core/stream/adaptation/adaptation_stream.js +35 -9
- package/dist/commonjs/core/stream/adaptation/index.d.ts +1 -1
- package/dist/commonjs/core/stream/adaptation/index.d.ts.map +1 -1
- package/dist/commonjs/core/stream/adaptation/index.js +0 -15
- package/dist/commonjs/core/stream/orchestrator/stream_orchestrator.js +2 -2
- package/dist/commonjs/core/stream/period/index.d.ts +1 -1
- package/dist/commonjs/core/stream/period/index.d.ts.map +1 -1
- package/dist/commonjs/core/stream/period/index.js +0 -15
- package/dist/commonjs/core/stream/period/period_stream.js +2 -2
- package/dist/commonjs/core/stream/representation/index.d.ts +1 -1
- package/dist/commonjs/core/stream/representation/index.d.ts.map +1 -1
- package/dist/commonjs/core/stream/representation/index.js +0 -15
- package/dist/commonjs/core/stream/representation/representation_stream.d.ts.map +1 -1
- package/dist/commonjs/core/stream/representation/representation_stream.js +2 -0
- package/dist/commonjs/core/stream/representation/utils/append_segment_to_buffer.d.ts.map +1 -1
- package/dist/commonjs/core/stream/representation/utils/append_segment_to_buffer.js +16 -11
- package/dist/commonjs/core/stream/representation/utils/push_init_segment.js +2 -2
- package/dist/commonjs/core/stream/representation/utils/push_media_segment.js +2 -2
- package/dist/commonjs/default_config.js +4 -0
- package/dist/commonjs/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.js +2 -2
- package/dist/commonjs/experimental/tools/createMetaplaylist/get_duration_from_manifest.js +2 -2
- package/dist/commonjs/main_thread/api/public_api.d.ts.map +1 -1
- package/dist/commonjs/main_thread/api/public_api.js +19 -4
- package/dist/commonjs/main_thread/decrypt/attach_media_keys.js +2 -2
- package/dist/commonjs/main_thread/decrypt/content_decryptor.d.ts.map +1 -1
- package/dist/commonjs/main_thread/decrypt/content_decryptor.js +4 -2
- package/dist/commonjs/main_thread/decrypt/create_or_load_session.js +2 -2
- package/dist/commonjs/main_thread/decrypt/create_session.js +2 -2
- package/dist/commonjs/main_thread/decrypt/dispose_decryption_resources.js +2 -2
- package/dist/commonjs/main_thread/decrypt/find_key_system.js +2 -2
- package/dist/commonjs/main_thread/decrypt/get_media_keys.d.ts.map +1 -1
- package/dist/commonjs/main_thread/decrypt/get_media_keys.js +3 -2
- package/dist/commonjs/main_thread/decrypt/init_media_keys.js +2 -2
- package/dist/commonjs/main_thread/decrypt/session_events_listener.js +2 -2
- package/dist/commonjs/main_thread/decrypt/set_server_certificate.js +2 -4
- package/dist/commonjs/main_thread/decrypt/utils/clean_old_loaded_sessions.js +2 -2
- package/dist/commonjs/main_thread/decrypt/utils/loaded_sessions_store.js +2 -2
- package/dist/commonjs/main_thread/init/directfile_content_initializer.d.ts.map +1 -1
- package/dist/commonjs/main_thread/init/directfile_content_initializer.js +14 -6
- package/dist/commonjs/main_thread/init/media_source_content_initializer.js +2 -2
- package/dist/commonjs/main_thread/init/multi_thread_content_initializer.d.ts +13 -0
- package/dist/commonjs/main_thread/init/multi_thread_content_initializer.d.ts.map +1 -1
- package/dist/commonjs/main_thread/init/multi_thread_content_initializer.js +96 -47
- package/dist/commonjs/main_thread/init/utils/initial_seek_and_play.d.ts +1 -1
- package/dist/commonjs/main_thread/init/utils/initial_seek_and_play.d.ts.map +1 -1
- package/dist/commonjs/main_thread/init/utils/initial_seek_and_play.js +21 -5
- package/dist/commonjs/mse/main_media_source_interface.d.ts.map +1 -1
- package/dist/commonjs/mse/main_media_source_interface.js +21 -2
- package/dist/commonjs/multithread_types.d.ts +8 -1
- package/dist/commonjs/multithread_types.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/dash/wasm-parser/ts/dash-wasm-parser.js +2 -2
- package/dist/commonjs/parsers/manifest/index.d.ts +1 -1
- package/dist/commonjs/parsers/manifest/index.d.ts.map +1 -1
- package/dist/commonjs/parsers/manifest/index.js +0 -15
- package/dist/commonjs/transports/dash/integrity_checks.js +2 -2
- package/dist/commonjs/transports/dash/load_chunked_segment_data.js +2 -2
- package/dist/commonjs/transports/dash/segment_loader.js +2 -2
- package/dist/commonjs/transports/dash/text_loader.js +2 -2
- package/dist/commonjs/transports/smooth/pipelines.d.ts.map +1 -1
- package/dist/commonjs/transports/smooth/pipelines.js +1 -0
- package/dist/commonjs/transports/smooth/segment_loader.js +2 -2
- package/dist/commonjs/transports/utils/parse_text_track.d.ts.map +1 -1
- package/dist/commonjs/transports/utils/parse_text_track.js +1 -0
- package/dist/commonjs/utils/request/fetch.js +2 -2
- package/dist/commonjs/utils/retry_promise_with_backoff.js +2 -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/compat/patch_webkit_source_buffer.d.ts.map +1 -1
- package/dist/es2017/compat/patch_webkit_source_buffer.js +0 -3
- package/dist/es2017/config.d.ts +7 -156
- package/dist/es2017/config.d.ts.map +1 -1
- package/dist/es2017/config.js +6 -1
- package/dist/es2017/core/main/worker/worker_main.d.ts.map +1 -1
- package/dist/es2017/core/main/worker/worker_main.js +7 -0
- package/dist/es2017/core/stream/adaptation/adaptation_stream.d.ts.map +1 -1
- package/dist/es2017/core/stream/adaptation/adaptation_stream.js +33 -7
- package/dist/es2017/core/stream/adaptation/index.d.ts +1 -1
- package/dist/es2017/core/stream/adaptation/index.d.ts.map +1 -1
- package/dist/es2017/core/stream/adaptation/index.js +0 -1
- package/dist/es2017/core/stream/period/index.d.ts +1 -1
- package/dist/es2017/core/stream/period/index.d.ts.map +1 -1
- package/dist/es2017/core/stream/period/index.js +0 -1
- package/dist/es2017/core/stream/representation/index.d.ts +1 -1
- package/dist/es2017/core/stream/representation/index.d.ts.map +1 -1
- package/dist/es2017/core/stream/representation/index.js +0 -1
- package/dist/es2017/core/stream/representation/representation_stream.d.ts.map +1 -1
- package/dist/es2017/core/stream/representation/representation_stream.js +2 -0
- package/dist/es2017/core/stream/representation/utils/append_segment_to_buffer.d.ts.map +1 -1
- package/dist/es2017/core/stream/representation/utils/append_segment_to_buffer.js +6 -2
- package/dist/es2017/default_config.js +4 -0
- package/dist/es2017/main_thread/api/public_api.d.ts.map +1 -1
- package/dist/es2017/main_thread/api/public_api.js +17 -2
- package/dist/es2017/main_thread/decrypt/content_decryptor.d.ts.map +1 -1
- package/dist/es2017/main_thread/decrypt/content_decryptor.js +2 -0
- package/dist/es2017/main_thread/decrypt/get_media_keys.d.ts.map +1 -1
- package/dist/es2017/main_thread/decrypt/get_media_keys.js +1 -0
- package/dist/es2017/main_thread/init/directfile_content_initializer.d.ts.map +1 -1
- package/dist/es2017/main_thread/init/directfile_content_initializer.js +14 -6
- package/dist/es2017/main_thread/init/multi_thread_content_initializer.d.ts +13 -0
- package/dist/es2017/main_thread/init/multi_thread_content_initializer.d.ts.map +1 -1
- package/dist/es2017/main_thread/init/multi_thread_content_initializer.js +78 -41
- package/dist/es2017/main_thread/init/utils/initial_seek_and_play.d.ts +1 -1
- package/dist/es2017/main_thread/init/utils/initial_seek_and_play.d.ts.map +1 -1
- package/dist/es2017/main_thread/init/utils/initial_seek_and_play.js +19 -3
- package/dist/es2017/mse/main_media_source_interface.d.ts.map +1 -1
- package/dist/es2017/mse/main_media_source_interface.js +19 -0
- package/dist/es2017/multithread_types.d.ts +8 -1
- package/dist/es2017/multithread_types.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/index.d.ts +1 -1
- package/dist/es2017/parsers/manifest/index.d.ts.map +1 -1
- package/dist/es2017/parsers/manifest/index.js +1 -1
- package/dist/es2017/transports/smooth/pipelines.d.ts.map +1 -1
- package/dist/es2017/transports/smooth/pipelines.js +1 -0
- package/dist/es2017/transports/utils/parse_text_track.d.ts.map +1 -1
- package/dist/es2017/transports/utils/parse_text_track.js +1 -0
- package/dist/rx-player.js +101 -23
- package/dist/rx-player.min.js +14 -14
- package/dist/worker.js +6 -6
- package/package.json +38 -21
- package/src/__GENERATED_CODE/embedded_worker.ts +1 -1
- package/src/compat/patch_webkit_source_buffer.ts +0 -3
- package/src/config.ts +10 -2
- package/src/core/main/worker/worker_main.ts +8 -0
- package/src/core/stream/adaptation/adaptation_stream.ts +41 -8
- package/src/core/stream/adaptation/index.ts +1 -1
- package/src/core/stream/period/index.ts +1 -1
- package/src/core/stream/representation/index.ts +1 -1
- package/src/core/stream/representation/representation_stream.ts +11 -0
- package/src/core/stream/representation/utils/append_segment_to_buffer.ts +6 -2
- package/src/default_config.ts +21 -0
- package/src/main_thread/api/public_api.ts +19 -2
- package/src/main_thread/decrypt/content_decryptor.ts +2 -0
- package/src/main_thread/decrypt/get_media_keys.ts +1 -0
- package/src/main_thread/init/directfile_content_initializer.ts +20 -10
- package/src/main_thread/init/multi_thread_content_initializer.ts +94 -61
- package/src/main_thread/init/utils/initial_seek_and_play.ts +24 -5
- package/src/mse/main_media_source_interface.ts +20 -0
- package/src/multithread_types.ts +9 -0
- package/src/parsers/manifest/index.ts +1 -1
- package/src/transports/smooth/pipelines.ts +1 -0
- package/src/transports/utils/parse_text_track.ts +1 -0
|
@@ -464,6 +464,20 @@ export class MainSourceBufferInterface implements ISourceBufferInterface {
|
|
|
464
464
|
op.reject(error);
|
|
465
465
|
});
|
|
466
466
|
this._currentOperations = [];
|
|
467
|
+
|
|
468
|
+
// A synchronous error probably will not lead to updateend event, so we need to
|
|
469
|
+
// go to next queue element manually
|
|
470
|
+
//
|
|
471
|
+
// FIXME: This here is needed to ensure that we're not left with a
|
|
472
|
+
// dangling queue of operations.
|
|
473
|
+
// However it can potentially be counter-productive if e.g. the `appendBuffer`
|
|
474
|
+
// error was due to a full buffer and if there are pushing operations awaiting in
|
|
475
|
+
// the queue.
|
|
476
|
+
//
|
|
477
|
+
// A better solution might just be to reject all push operations right away here?
|
|
478
|
+
// Only for a `QuotaExceededError` (to check MSE)?
|
|
479
|
+
// However this is too disruptive for what is now a hotfix
|
|
480
|
+
this._performNextOperation();
|
|
467
481
|
}
|
|
468
482
|
} else {
|
|
469
483
|
// TODO merge contiguous removes?
|
|
@@ -482,7 +496,13 @@ export class MainSourceBufferInterface implements ISourceBufferInterface {
|
|
|
482
496
|
false,
|
|
483
497
|
);
|
|
484
498
|
nextElem.reject(error);
|
|
499
|
+
this._currentOperations.forEach((op) => {
|
|
500
|
+
op.reject(error);
|
|
501
|
+
});
|
|
485
502
|
this._currentOperations = [];
|
|
503
|
+
// A synchronous error probably will not lead to updateend event, so we need to
|
|
504
|
+
// go to next queue element manually
|
|
505
|
+
this._performNextOperation();
|
|
486
506
|
}
|
|
487
507
|
}
|
|
488
508
|
}
|
package/src/multithread_types.ts
CHANGED
|
@@ -14,6 +14,7 @@ import type {
|
|
|
14
14
|
IRepresentationsChoice,
|
|
15
15
|
ITrackSwitchingMode,
|
|
16
16
|
} from "./core/types";
|
|
17
|
+
import type { IDefaultConfig } from "./default_config";
|
|
17
18
|
import type {
|
|
18
19
|
ISerializedMediaError,
|
|
19
20
|
ISerializedNetworkError,
|
|
@@ -158,6 +159,12 @@ export interface ILogLevelUpdateMessage {
|
|
|
158
159
|
};
|
|
159
160
|
}
|
|
160
161
|
|
|
162
|
+
/** Message sent by the main thread to update the Worker's global config. */
|
|
163
|
+
export interface IConfigUpdateMessage {
|
|
164
|
+
type: MainThreadMessageType.ConfigUpdate;
|
|
165
|
+
value: Partial<IDefaultConfig>;
|
|
166
|
+
}
|
|
167
|
+
|
|
161
168
|
/**
|
|
162
169
|
* Message sent by the main thread when a new content should be "prepared".
|
|
163
170
|
*
|
|
@@ -542,6 +549,7 @@ export const enum MainThreadMessageType {
|
|
|
542
549
|
RemoveTextDataError = "remove-text-error",
|
|
543
550
|
CodecSupportUpdate = "codec-support-update",
|
|
544
551
|
ContentUrlsUpdate = "urls-update",
|
|
552
|
+
ConfigUpdate = "config-update",
|
|
545
553
|
DecipherabilityStatusUpdate = "decipherability-update",
|
|
546
554
|
LogLevelUpdate = "log-level-update",
|
|
547
555
|
MediaSourceReadyStateChange = "media-source-ready-state-change",
|
|
@@ -560,6 +568,7 @@ export const enum MainThreadMessageType {
|
|
|
560
568
|
export type IMainThreadMessage =
|
|
561
569
|
| IInitMessage
|
|
562
570
|
| ILogLevelUpdateMessage
|
|
571
|
+
| IConfigUpdateMessage
|
|
563
572
|
| IPrepareContentMessage
|
|
564
573
|
| IStopContentMessage
|
|
565
574
|
| IStartPreparedContentMessage
|
|
@@ -350,6 +350,7 @@ export default function (transportOptions: ITransportOptions): ITransportPipelin
|
|
|
350
350
|
if (
|
|
351
351
|
mimeType === "application/ttml+xml+mp4" ||
|
|
352
352
|
lcCodec === "stpp" ||
|
|
353
|
+
lcCodec === "stpp.ttml" ||
|
|
353
354
|
lcCodec === "stpp.ttml.im1t"
|
|
354
355
|
) {
|
|
355
356
|
_sdType = "ttml";
|
|
@@ -42,6 +42,7 @@ export function getISOBMFFTextTrackFormat(codecs: string | undefined): "ttml" |
|
|
|
42
42
|
}
|
|
43
43
|
switch (codecs.toLowerCase()) {
|
|
44
44
|
case "stpp": // stpp === TTML in MP4
|
|
45
|
+
case "stpp.ttml":
|
|
45
46
|
case "stpp.ttml.im1t":
|
|
46
47
|
return "ttml";
|
|
47
48
|
case "wvtt": // wvtt === WebVTT in MP4
|