rx-player 3.30.0-dev.2023022200 → 3.30.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/.eslintrc.js +8 -0
- package/CHANGELOG.md +4 -1
- package/VERSION +1 -1
- package/dist/_esm5.processed/compat/browser_detection.d.ts +23 -12
- package/dist/_esm5.processed/compat/browser_detection.js +80 -38
- package/dist/_esm5.processed/compat/can_reuse_media_keys.js +2 -2
- package/dist/_esm5.processed/config.d.ts +2 -0
- package/dist/_esm5.processed/core/api/debug/buffer_size_graph.js +0 -1
- package/dist/_esm5.processed/core/api/public_api.js +3 -3
- package/dist/_esm5.processed/core/decrypt/__tests__/__global__/utils.d.ts +27 -8
- package/dist/_esm5.processed/core/decrypt/__tests__/__global__/utils.js +28 -7
- package/dist/_esm5.processed/core/decrypt/find_key_system.js +33 -24
- package/dist/_esm5.processed/core/decrypt/session_events_listener.js +27 -13
- package/dist/_esm5.processed/core/fetchers/utils/schedule_request.js +13 -4
- package/dist/_esm5.processed/core/init/utils/media_duration_updater.js +1 -1
- package/dist/_esm5.processed/core/init/utils/rebuffering_controller.js +1 -1
- package/dist/_esm5.processed/core/stream/adaptation/adaptation_stream.js +15 -5
- package/dist/_esm5.processed/default_config.d.ts +16 -0
- package/dist/_esm5.processed/default_config.js +19 -0
- package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.js +5 -2
- package/dist/_esm5.processed/transports/dash/add_segment_integrity_checks_to_loader.js +5 -2
- package/dist/rx-player.js +162 -72
- package/dist/rx-player.min.js +1 -1
- package/package.json +2 -1
- package/sonar-project.properties +1 -1
- package/src/compat/browser_detection.ts +99 -52
- package/src/compat/can_reuse_media_keys.ts +5 -2
- package/src/core/api/debug/buffer_size_graph.ts +0 -1
- package/src/core/api/public_api.ts +3 -3
- package/src/core/decrypt/__tests__/__global__/utils.ts +61 -40
- package/src/core/decrypt/find_key_system.ts +36 -35
- package/src/core/decrypt/session_events_listener.ts +28 -15
- package/src/core/fetchers/utils/schedule_request.ts +14 -4
- package/src/core/init/utils/media_duration_updater.ts +1 -1
- package/src/core/init/utils/rebuffering_controller.ts +1 -1
- package/src/core/stream/adaptation/adaptation_stream.ts +18 -8
- package/src/default_config.ts +30 -9
- package/src/experimental/tools/VideoThumbnailLoader/video_thumbnail_loader.ts +4 -1
- package/src/transports/dash/add_segment_integrity_checks_to_loader.ts +5 -2
package/src/default_config.ts
CHANGED
|
@@ -923,15 +923,36 @@ const DEFAULT_CONFIG = {
|
|
|
923
923
|
*/
|
|
924
924
|
MIN_CANCELABLE_PRIORITY: 3, // priority number 3 onward can be cancelled
|
|
925
925
|
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
926
|
+
/**
|
|
927
|
+
* Codecs used in the videoCapabilities of the MediaKeySystemConfiguration
|
|
928
|
+
* (DRM).
|
|
929
|
+
*
|
|
930
|
+
* Defined in order of importance (first will be tested first etc.)
|
|
931
|
+
* @type {Array.<string>}
|
|
932
|
+
*/
|
|
933
|
+
EME_DEFAULT_VIDEO_CODECS: [ "video/mp4;codecs=\"avc1.4d401e\"",
|
|
934
|
+
"video/mp4;codecs=\"avc1.42e01e\"",
|
|
935
|
+
"video/webm;codecs=\"vp8\"" ],
|
|
936
|
+
|
|
937
|
+
/**
|
|
938
|
+
* Codecs used in the audioCapabilities of the MediaKeySystemConfiguration
|
|
939
|
+
* (DRM).
|
|
940
|
+
*
|
|
941
|
+
* Defined in order of importance (first will be tested first etc.)
|
|
942
|
+
* @type {Array.<string>}
|
|
943
|
+
*/
|
|
944
|
+
EME_DEFAULT_AUDIO_CODECS: [ "audio/mp4;codecs=\"mp4a.40.2\"",
|
|
945
|
+
"audio/webm;codecs=opus" ],
|
|
946
|
+
|
|
947
|
+
/**
|
|
948
|
+
* Robustnesses used in the {audio,video}Capabilities of the
|
|
949
|
+
* MediaKeySystemConfiguration (DRM).
|
|
950
|
+
*
|
|
951
|
+
* Only used for widevine keysystems.
|
|
952
|
+
*
|
|
953
|
+
* Defined in order of importance (first will be tested first etc.)
|
|
954
|
+
* @type {Array.<string>}
|
|
955
|
+
*/
|
|
935
956
|
EME_DEFAULT_WIDEVINE_ROBUSTNESSES: [ "HW_SECURE_ALL",
|
|
936
957
|
"HW_SECURE_DECODE",
|
|
937
958
|
"HW_SECURE_CRYPTO",
|
|
@@ -252,7 +252,10 @@ export default class VideoThumbnailLoader {
|
|
|
252
252
|
segmentBuffer,
|
|
253
253
|
lastRepInfo.segmentFetcher,
|
|
254
254
|
requestCanceller.signal)
|
|
255
|
-
.
|
|
255
|
+
.then(unlinkSignal, (err) => {
|
|
256
|
+
unlinkSignal();
|
|
257
|
+
throw err;
|
|
258
|
+
});
|
|
256
259
|
const newReq = {
|
|
257
260
|
segmentId: segment.id,
|
|
258
261
|
canceller: requestCanceller,
|
|
@@ -53,9 +53,9 @@ export default function addSegmentIntegrityChecks<T>(
|
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
55
|
})
|
|
56
|
-
.finally(() => cleanUpCancellers())
|
|
57
56
|
.then(
|
|
58
57
|
(info) => {
|
|
58
|
+
cleanUpCancellers();
|
|
59
59
|
if (requestCanceller.isUsed()) {
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
@@ -69,7 +69,10 @@ export default function addSegmentIntegrityChecks<T>(
|
|
|
69
69
|
}
|
|
70
70
|
resolve(info);
|
|
71
71
|
},
|
|
72
|
-
|
|
72
|
+
(err : unknown) => {
|
|
73
|
+
cleanUpCancellers();
|
|
74
|
+
reject(err);
|
|
75
|
+
}
|
|
73
76
|
);
|
|
74
77
|
|
|
75
78
|
function cleanUpCancellers() {
|