rx-player 3.27.0-dev.20220317 → 3.27.0-dev.2022032100
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 +0 -4
- package/CHANGELOG.md +3 -2
- package/VERSION +1 -1
- package/dist/_esm5.processed/compat/eme/close_session.js +1 -2
- package/dist/_esm5.processed/compat/eme/custom_key_system_access.d.ts +15 -0
- package/dist/_esm5.processed/compat/eme/custom_key_system_access.js +1 -17
- package/dist/_esm5.processed/compat/eme/custom_media_keys/ie11_media_keys.js +6 -7
- package/dist/_esm5.processed/compat/eme/custom_media_keys/index.js +3 -4
- package/dist/_esm5.processed/compat/eme/custom_media_keys/old_webkit_media_keys.js +6 -7
- package/dist/_esm5.processed/compat/eme/custom_media_keys/webkit_media_keys.js +7 -8
- package/dist/_esm5.processed/compat/eme/load_session.js +1 -2
- package/dist/_esm5.processed/core/api/option_utils.d.ts +3 -2
- package/dist/_esm5.processed/core/api/option_utils.js +2 -1
- package/dist/_esm5.processed/core/api/public_api.js +3 -4
- package/dist/_esm5.processed/core/decrypt/attach_media_keys.js +1 -2
- package/dist/_esm5.processed/core/decrypt/clear_on_stop.js +1 -2
- package/dist/_esm5.processed/core/decrypt/content_decryptor.js +1 -2
- package/dist/_esm5.processed/core/decrypt/create_session.js +1 -2
- package/dist/_esm5.processed/core/decrypt/find_key_system.js +1 -2
- package/dist/_esm5.processed/core/decrypt/utils/clean_old_loaded_sessions.js +1 -2
- package/dist/_esm5.processed/core/decrypt/utils/loaded_sessions_store.js +5 -6
- package/dist/_esm5.processed/core/fetchers/manifest/manifest_fetcher.js +1 -3
- package/dist/_esm5.processed/core/fetchers/utils/try_urls_with_backoff.js +2 -3
- package/dist/_esm5.processed/core/init/initialize_media_source.d.ts +2 -1
- package/dist/_esm5.processed/core/stream/index.d.ts +1 -0
- package/dist/_esm5.processed/core/stream/period/get_adaptation_switch_strategy.d.ts +15 -11
- package/dist/_esm5.processed/core/stream/period/get_adaptation_switch_strategy.js +5 -2
- package/dist/_esm5.processed/core/stream/period/index.d.ts +1 -0
- package/dist/_esm5.processed/core/stream/period/period_stream.d.ts +3 -11
- package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/thumbnail_loader.js +5 -6
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/api/index.js +2 -3
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/api/probeMediaConfiguration.d.ts +15 -0
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/api/probeMediaConfiguration.js +1 -2
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/DRMInfos.js +2 -3
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/HDCPPolicy.js +2 -3
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/decodingInfo.js +1 -2
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.js +1 -2
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/index.js +1 -2
- package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.js +1 -2
- package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/dash-wasm-parser.js +4 -5
- package/dist/_esm5.processed/public_types.d.ts +1 -0
- package/dist/_esm5.processed/transports/dash/add_segment_integrity_checks_to_loader.js +1 -2
- package/dist/_esm5.processed/transports/dash/image_pipelines.d.ts +4 -3
- package/dist/_esm5.processed/transports/dash/image_pipelines.js +57 -11
- package/dist/_esm5.processed/transports/dash/init_segment_loader.js +1 -2
- package/dist/_esm5.processed/transports/dash/manifest_parser.js +2 -3
- package/dist/_esm5.processed/transports/dash/segment_loader.d.ts +1 -1
- package/dist/_esm5.processed/transports/dash/segment_loader.js +3 -4
- package/dist/_esm5.processed/transports/dash/text_loader.js +1 -2
- package/dist/_esm5.processed/transports/local/segment_loader.js +2 -3
- package/dist/_esm5.processed/transports/metaplaylist/pipelines.js +2 -3
- package/dist/_esm5.processed/transports/smooth/pipelines.js +3 -4
- package/dist/_esm5.processed/transports/smooth/segment_loader.js +3 -4
- package/dist/_esm5.processed/transports/utils/call_custom_manifest_loader.js +1 -2
- package/dist/_esm5.processed/utils/cancellable_sleep.js +1 -2
- package/dist/_esm5.processed/utils/cast_to_observable.js +1 -3
- package/dist/_esm5.processed/utils/request/xhr.js +1 -2
- package/dist/rx-player.js +128 -501
- package/dist/rx-player.min.js +1 -1
- package/package.json +1 -2
- package/scripts/update-version +2 -2
- package/sonar-project.properties +1 -1
- package/src/compat/__tests__/play.test.ts +2 -4
- package/src/compat/eme/close_session.ts +1 -2
- package/src/compat/eme/custom_key_system_access.ts +1 -2
- package/src/compat/eme/custom_media_keys/ie11_media_keys.ts +6 -7
- package/src/compat/eme/custom_media_keys/index.ts +3 -4
- package/src/compat/eme/custom_media_keys/old_webkit_media_keys.ts +6 -7
- package/src/compat/eme/custom_media_keys/webkit_media_keys.ts +7 -8
- package/src/compat/eme/load_session.ts +1 -2
- package/src/core/api/__tests__/option_utils.test.ts +12 -0
- package/src/core/api/option_utils.ts +5 -3
- package/src/core/api/public_api.ts +3 -4
- package/src/core/decrypt/attach_media_keys.ts +1 -2
- package/src/core/decrypt/clear_on_stop.ts +1 -2
- package/src/core/decrypt/content_decryptor.ts +1 -2
- package/src/core/decrypt/create_session.ts +2 -3
- package/src/core/decrypt/find_key_system.ts +1 -2
- package/src/core/decrypt/utils/clean_old_loaded_sessions.ts +1 -2
- package/src/core/decrypt/utils/loaded_sessions_store.ts +5 -6
- package/src/core/fetchers/manifest/manifest_fetcher.ts +1 -3
- package/src/core/fetchers/utils/try_urls_with_backoff.ts +2 -3
- package/src/core/init/initialize_media_source.ts +2 -1
- package/src/core/stream/index.ts +1 -0
- package/src/core/stream/period/get_adaptation_switch_strategy.ts +24 -14
- package/src/core/stream/period/index.ts +1 -0
- package/src/core/stream/period/period_stream.ts +5 -14
- package/src/experimental/tools/VideoThumbnailLoader/thumbnail_loader.ts +5 -6
- package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/HDCPPolicy.test.ts +5 -6
- package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/decodingInfos.test.ts +2 -4
- package/src/experimental/tools/mediaCapabilitiesProber/api/index.ts +2 -3
- package/src/experimental/tools/mediaCapabilitiesProber/api/probeMediaConfiguration.ts +1 -2
- package/src/experimental/tools/mediaCapabilitiesProber/probers/DRMInfos.ts +2 -3
- package/src/experimental/tools/mediaCapabilitiesProber/probers/HDCPPolicy.ts +2 -3
- package/src/experimental/tools/mediaCapabilitiesProber/probers/decodingInfo.ts +1 -2
- package/src/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.ts +1 -2
- package/src/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/index.ts +1 -2
- package/src/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.ts +1 -2
- package/src/parsers/manifest/dash/wasm-parser/ts/dash-wasm-parser.ts +4 -5
- package/src/public_types.ts +1 -0
- package/src/transports/dash/add_segment_integrity_checks_to_loader.ts +1 -2
- package/src/transports/dash/image_pipelines.ts +12 -14
- package/src/transports/dash/init_segment_loader.ts +1 -2
- package/src/transports/dash/manifest_parser.ts +2 -3
- package/src/transports/dash/segment_loader.ts +4 -5
- package/src/transports/dash/text_loader.ts +2 -3
- package/src/transports/local/segment_loader.ts +2 -3
- package/src/transports/metaplaylist/pipelines.ts +2 -3
- package/src/transports/smooth/pipelines.ts +4 -5
- package/src/transports/smooth/segment_loader.ts +5 -6
- package/src/transports/utils/call_custom_manifest_loader.ts +1 -2
- package/src/utils/cancellable_sleep.ts +1 -2
- package/src/utils/cast_to_observable.ts +0 -2
- package/src/utils/request/xhr.ts +1 -2
- package/tsconfig.json +0 -1
- package/tsconfig.modules.json +0 -1
- package/dist/_esm5.processed/utils/promise.d.ts +0 -17
- package/dist/_esm5.processed/utils/promise.js +0 -18
- package/src/typings/pinkie.d.ts +0 -19
- package/src/utils/__tests__/promise.test.ts +0 -23
- package/src/utils/promise.ts +0 -20
|
@@ -24,7 +24,6 @@ import { getMDAT } from "../../parsers/containers/isobmff";
|
|
|
24
24
|
import createSmoothManifestParser, {
|
|
25
25
|
SmoothRepresentationIndex,
|
|
26
26
|
} from "../../parsers/manifest/smooth";
|
|
27
|
-
import PPromise from "../../utils/promise";
|
|
28
27
|
import request from "../../utils/request";
|
|
29
28
|
import {
|
|
30
29
|
strToUtf8,
|
|
@@ -108,7 +107,7 @@ export default function(options : ITransportOptions) : ITransportPipelines {
|
|
|
108
107
|
cancelSignal : CancellationSignal
|
|
109
108
|
) : Promise<string | undefined> {
|
|
110
109
|
if (url === undefined) {
|
|
111
|
-
return
|
|
110
|
+
return Promise.resolve(undefined);
|
|
112
111
|
}
|
|
113
112
|
|
|
114
113
|
let resolving : Promise<string>;
|
|
@@ -126,7 +125,7 @@ export default function(options : ITransportOptions) : ITransportPipelines {
|
|
|
126
125
|
return extractedURL;
|
|
127
126
|
});
|
|
128
127
|
} else {
|
|
129
|
-
resolving =
|
|
128
|
+
resolving = Promise.resolve(url);
|
|
130
129
|
}
|
|
131
130
|
|
|
132
131
|
const token = extractToken(url);
|
|
@@ -263,8 +262,8 @@ export default function(options : ITransportOptions) : ITransportPipelines {
|
|
|
263
262
|
ISegmentLoaderResultSegmentCreated<ILoadedTextSegmentFormat>> {
|
|
264
263
|
const { segment, representation } = content;
|
|
265
264
|
if (segment.isInit || url === null) {
|
|
266
|
-
return
|
|
267
|
-
|
|
265
|
+
return Promise.resolve({ resultType: "segment-created",
|
|
266
|
+
resultData: null });
|
|
268
267
|
}
|
|
269
268
|
|
|
270
269
|
const isMP4 = isMP4EmbeddedTrack(representation);
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
|
|
17
17
|
import { CustomLoaderError } from "../../errors";
|
|
18
18
|
import assert from "../../utils/assert";
|
|
19
|
-
import PPromise from "../../utils/promise";
|
|
20
19
|
import request from "../../utils/request";
|
|
21
20
|
import {
|
|
22
21
|
CancellationError,
|
|
@@ -143,11 +142,11 @@ const generateSegmentLoader = ({
|
|
|
143
142
|
responseData = new Uint8Array(0);
|
|
144
143
|
}
|
|
145
144
|
|
|
146
|
-
return
|
|
147
|
-
|
|
145
|
+
return Promise.resolve({ resultType: "segment-created" as const,
|
|
146
|
+
resultData: responseData });
|
|
148
147
|
} else if (url === null) {
|
|
149
|
-
return
|
|
150
|
-
|
|
148
|
+
return Promise.resolve({ resultType: "segment-created" as const,
|
|
149
|
+
resultData: null });
|
|
151
150
|
} else {
|
|
152
151
|
const args = { adaptation,
|
|
153
152
|
manifest,
|
|
@@ -165,7 +164,7 @@ const generateSegmentLoader = ({
|
|
|
165
164
|
checkMediaSegmentIntegrity);
|
|
166
165
|
}
|
|
167
166
|
|
|
168
|
-
return new
|
|
167
|
+
return new Promise((res, rej) => {
|
|
169
168
|
/** `true` when the custom segmentLoader should not be active anymore. */
|
|
170
169
|
let hasFinished = false;
|
|
171
170
|
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { CustomLoaderError } from "../../errors";
|
|
18
|
-
import PPromise from "../../utils/promise";
|
|
19
18
|
import {
|
|
20
19
|
CancellationError,
|
|
21
20
|
CancellationSignal,
|
|
@@ -41,7 +40,7 @@ export default function callCustomManifestLoader(
|
|
|
41
40
|
url : string | undefined,
|
|
42
41
|
cancelSignal : CancellationSignal
|
|
43
42
|
) : Promise< IRequestedData<ILoadedManifestFormat> > => {
|
|
44
|
-
return new
|
|
43
|
+
return new Promise((res, rej) => {
|
|
45
44
|
const timeAPIsDelta = Date.now() - performance.now();
|
|
46
45
|
/** `true` when the custom segmentLoader should not be active anymore. */
|
|
47
46
|
let hasFinished = false;
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import PPromise from "./promise";
|
|
18
17
|
import {
|
|
19
18
|
CancellationError,
|
|
20
19
|
CancellationSignal,
|
|
@@ -37,7 +36,7 @@ export default function cancellableSleep(
|
|
|
37
36
|
delay: number,
|
|
38
37
|
cancellationSignal: CancellationSignal
|
|
39
38
|
) : Promise<void> {
|
|
40
|
-
return new
|
|
39
|
+
return new Promise((res, rej) => {
|
|
41
40
|
const timeout = setTimeout(() => {
|
|
42
41
|
unregisterCancelSignal();
|
|
43
42
|
res();
|
|
@@ -20,7 +20,6 @@ import {
|
|
|
20
20
|
of as observableOf,
|
|
21
21
|
} from "rxjs";
|
|
22
22
|
import isNullOrUndefined from "./is_null_or_undefined";
|
|
23
|
-
import PPromise from "./promise";
|
|
24
23
|
|
|
25
24
|
/**
|
|
26
25
|
* Try to cast the given value into an observable.
|
|
@@ -34,7 +33,6 @@ function castToObservable<T>(value : Observable<T> |
|
|
|
34
33
|
if (value instanceof Observable) {
|
|
35
34
|
return value;
|
|
36
35
|
} else if (
|
|
37
|
-
value instanceof PPromise ||
|
|
38
36
|
value instanceof Promise ||
|
|
39
37
|
(
|
|
40
38
|
!isNullOrUndefined(value) &&
|
package/src/utils/request/xhr.ts
CHANGED
|
@@ -18,7 +18,6 @@ import config from "../../config";
|
|
|
18
18
|
import { RequestError } from "../../errors";
|
|
19
19
|
import isNonEmptyString from "../is_non_empty_string";
|
|
20
20
|
import isNullOrUndefined from "../is_null_or_undefined";
|
|
21
|
-
import PPromise from "../promise";
|
|
22
21
|
import {
|
|
23
22
|
CancellationError,
|
|
24
23
|
CancellationSignal,
|
|
@@ -140,7 +139,7 @@ export default function request<T>(
|
|
|
140
139
|
options.timeout,
|
|
141
140
|
};
|
|
142
141
|
|
|
143
|
-
return new
|
|
142
|
+
return new Promise((resolve, reject) => {
|
|
144
143
|
const { onProgress, cancelSignal } = options;
|
|
145
144
|
const { url,
|
|
146
145
|
headers,
|
package/tsconfig.json
CHANGED
package/tsconfig.modules.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2015 CANAL+ Group
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
declare const _default: PromiseConstructor;
|
|
17
|
-
export default _default;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2015 CANAL+ Group
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import pinkie from "pinkie";
|
|
17
|
-
export default typeof Promise === "function" ? Promise :
|
|
18
|
-
pinkie;
|
package/src/typings/pinkie.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2015 CANAL+ Group
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
declare module "pinkie" {
|
|
18
|
-
export default Promise;
|
|
19
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2015 CANAL+ Group
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import promise from "../promise";
|
|
18
|
-
|
|
19
|
-
describe("utils - promise", () => {
|
|
20
|
-
it("should export the browser's Promise as a default", () => {
|
|
21
|
-
expect(promise).toBe(Promise);
|
|
22
|
-
});
|
|
23
|
-
});
|
package/src/utils/promise.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2015 CANAL+ Group
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import pinkie from "pinkie";
|
|
18
|
-
|
|
19
|
-
export default typeof Promise === "function" ? Promise :
|
|
20
|
-
pinkie;
|