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.
Files changed (121) hide show
  1. package/.eslintrc.js +0 -4
  2. package/CHANGELOG.md +3 -2
  3. package/VERSION +1 -1
  4. package/dist/_esm5.processed/compat/eme/close_session.js +1 -2
  5. package/dist/_esm5.processed/compat/eme/custom_key_system_access.d.ts +15 -0
  6. package/dist/_esm5.processed/compat/eme/custom_key_system_access.js +1 -17
  7. package/dist/_esm5.processed/compat/eme/custom_media_keys/ie11_media_keys.js +6 -7
  8. package/dist/_esm5.processed/compat/eme/custom_media_keys/index.js +3 -4
  9. package/dist/_esm5.processed/compat/eme/custom_media_keys/old_webkit_media_keys.js +6 -7
  10. package/dist/_esm5.processed/compat/eme/custom_media_keys/webkit_media_keys.js +7 -8
  11. package/dist/_esm5.processed/compat/eme/load_session.js +1 -2
  12. package/dist/_esm5.processed/core/api/option_utils.d.ts +3 -2
  13. package/dist/_esm5.processed/core/api/option_utils.js +2 -1
  14. package/dist/_esm5.processed/core/api/public_api.js +3 -4
  15. package/dist/_esm5.processed/core/decrypt/attach_media_keys.js +1 -2
  16. package/dist/_esm5.processed/core/decrypt/clear_on_stop.js +1 -2
  17. package/dist/_esm5.processed/core/decrypt/content_decryptor.js +1 -2
  18. package/dist/_esm5.processed/core/decrypt/create_session.js +1 -2
  19. package/dist/_esm5.processed/core/decrypt/find_key_system.js +1 -2
  20. package/dist/_esm5.processed/core/decrypt/utils/clean_old_loaded_sessions.js +1 -2
  21. package/dist/_esm5.processed/core/decrypt/utils/loaded_sessions_store.js +5 -6
  22. package/dist/_esm5.processed/core/fetchers/manifest/manifest_fetcher.js +1 -3
  23. package/dist/_esm5.processed/core/fetchers/utils/try_urls_with_backoff.js +2 -3
  24. package/dist/_esm5.processed/core/init/initialize_media_source.d.ts +2 -1
  25. package/dist/_esm5.processed/core/stream/index.d.ts +1 -0
  26. package/dist/_esm5.processed/core/stream/period/get_adaptation_switch_strategy.d.ts +15 -11
  27. package/dist/_esm5.processed/core/stream/period/get_adaptation_switch_strategy.js +5 -2
  28. package/dist/_esm5.processed/core/stream/period/index.d.ts +1 -0
  29. package/dist/_esm5.processed/core/stream/period/period_stream.d.ts +3 -11
  30. package/dist/_esm5.processed/experimental/tools/VideoThumbnailLoader/thumbnail_loader.js +5 -6
  31. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/api/index.js +2 -3
  32. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/api/probeMediaConfiguration.d.ts +15 -0
  33. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/api/probeMediaConfiguration.js +1 -2
  34. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/DRMInfos.js +2 -3
  35. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/HDCPPolicy.js +2 -3
  36. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/decodingInfo.js +1 -2
  37. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.js +1 -2
  38. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/index.js +1 -2
  39. package/dist/_esm5.processed/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.js +1 -2
  40. package/dist/_esm5.processed/parsers/manifest/dash/wasm-parser/ts/dash-wasm-parser.js +4 -5
  41. package/dist/_esm5.processed/public_types.d.ts +1 -0
  42. package/dist/_esm5.processed/transports/dash/add_segment_integrity_checks_to_loader.js +1 -2
  43. package/dist/_esm5.processed/transports/dash/image_pipelines.d.ts +4 -3
  44. package/dist/_esm5.processed/transports/dash/image_pipelines.js +57 -11
  45. package/dist/_esm5.processed/transports/dash/init_segment_loader.js +1 -2
  46. package/dist/_esm5.processed/transports/dash/manifest_parser.js +2 -3
  47. package/dist/_esm5.processed/transports/dash/segment_loader.d.ts +1 -1
  48. package/dist/_esm5.processed/transports/dash/segment_loader.js +3 -4
  49. package/dist/_esm5.processed/transports/dash/text_loader.js +1 -2
  50. package/dist/_esm5.processed/transports/local/segment_loader.js +2 -3
  51. package/dist/_esm5.processed/transports/metaplaylist/pipelines.js +2 -3
  52. package/dist/_esm5.processed/transports/smooth/pipelines.js +3 -4
  53. package/dist/_esm5.processed/transports/smooth/segment_loader.js +3 -4
  54. package/dist/_esm5.processed/transports/utils/call_custom_manifest_loader.js +1 -2
  55. package/dist/_esm5.processed/utils/cancellable_sleep.js +1 -2
  56. package/dist/_esm5.processed/utils/cast_to_observable.js +1 -3
  57. package/dist/_esm5.processed/utils/request/xhr.js +1 -2
  58. package/dist/rx-player.js +128 -501
  59. package/dist/rx-player.min.js +1 -1
  60. package/package.json +1 -2
  61. package/scripts/update-version +2 -2
  62. package/sonar-project.properties +1 -1
  63. package/src/compat/__tests__/play.test.ts +2 -4
  64. package/src/compat/eme/close_session.ts +1 -2
  65. package/src/compat/eme/custom_key_system_access.ts +1 -2
  66. package/src/compat/eme/custom_media_keys/ie11_media_keys.ts +6 -7
  67. package/src/compat/eme/custom_media_keys/index.ts +3 -4
  68. package/src/compat/eme/custom_media_keys/old_webkit_media_keys.ts +6 -7
  69. package/src/compat/eme/custom_media_keys/webkit_media_keys.ts +7 -8
  70. package/src/compat/eme/load_session.ts +1 -2
  71. package/src/core/api/__tests__/option_utils.test.ts +12 -0
  72. package/src/core/api/option_utils.ts +5 -3
  73. package/src/core/api/public_api.ts +3 -4
  74. package/src/core/decrypt/attach_media_keys.ts +1 -2
  75. package/src/core/decrypt/clear_on_stop.ts +1 -2
  76. package/src/core/decrypt/content_decryptor.ts +1 -2
  77. package/src/core/decrypt/create_session.ts +2 -3
  78. package/src/core/decrypt/find_key_system.ts +1 -2
  79. package/src/core/decrypt/utils/clean_old_loaded_sessions.ts +1 -2
  80. package/src/core/decrypt/utils/loaded_sessions_store.ts +5 -6
  81. package/src/core/fetchers/manifest/manifest_fetcher.ts +1 -3
  82. package/src/core/fetchers/utils/try_urls_with_backoff.ts +2 -3
  83. package/src/core/init/initialize_media_source.ts +2 -1
  84. package/src/core/stream/index.ts +1 -0
  85. package/src/core/stream/period/get_adaptation_switch_strategy.ts +24 -14
  86. package/src/core/stream/period/index.ts +1 -0
  87. package/src/core/stream/period/period_stream.ts +5 -14
  88. package/src/experimental/tools/VideoThumbnailLoader/thumbnail_loader.ts +5 -6
  89. package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/HDCPPolicy.test.ts +5 -6
  90. package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/decodingInfos.test.ts +2 -4
  91. package/src/experimental/tools/mediaCapabilitiesProber/api/index.ts +2 -3
  92. package/src/experimental/tools/mediaCapabilitiesProber/api/probeMediaConfiguration.ts +1 -2
  93. package/src/experimental/tools/mediaCapabilitiesProber/probers/DRMInfos.ts +2 -3
  94. package/src/experimental/tools/mediaCapabilitiesProber/probers/HDCPPolicy.ts +2 -3
  95. package/src/experimental/tools/mediaCapabilitiesProber/probers/decodingInfo.ts +1 -2
  96. package/src/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.ts +1 -2
  97. package/src/experimental/tools/mediaCapabilitiesProber/probers/mediaContentTypeWithFeatures/index.ts +1 -2
  98. package/src/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.ts +1 -2
  99. package/src/parsers/manifest/dash/wasm-parser/ts/dash-wasm-parser.ts +4 -5
  100. package/src/public_types.ts +1 -0
  101. package/src/transports/dash/add_segment_integrity_checks_to_loader.ts +1 -2
  102. package/src/transports/dash/image_pipelines.ts +12 -14
  103. package/src/transports/dash/init_segment_loader.ts +1 -2
  104. package/src/transports/dash/manifest_parser.ts +2 -3
  105. package/src/transports/dash/segment_loader.ts +4 -5
  106. package/src/transports/dash/text_loader.ts +2 -3
  107. package/src/transports/local/segment_loader.ts +2 -3
  108. package/src/transports/metaplaylist/pipelines.ts +2 -3
  109. package/src/transports/smooth/pipelines.ts +4 -5
  110. package/src/transports/smooth/segment_loader.ts +5 -6
  111. package/src/transports/utils/call_custom_manifest_loader.ts +1 -2
  112. package/src/utils/cancellable_sleep.ts +1 -2
  113. package/src/utils/cast_to_observable.ts +0 -2
  114. package/src/utils/request/xhr.ts +1 -2
  115. package/tsconfig.json +0 -1
  116. package/tsconfig.modules.json +0 -1
  117. package/dist/_esm5.processed/utils/promise.d.ts +0 -17
  118. package/dist/_esm5.processed/utils/promise.js +0 -18
  119. package/src/typings/pinkie.d.ts +0 -19
  120. package/src/utils/__tests__/promise.test.ts +0 -23
  121. 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 PPromise.resolve(undefined);
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 = PPromise.resolve(url);
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 PPromise.resolve({ resultType: "segment-created",
267
- resultData: null });
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 PPromise.resolve({ resultType: "segment-created" as const,
147
- resultData: responseData });
145
+ return Promise.resolve({ resultType: "segment-created" as const,
146
+ resultData: responseData });
148
147
  } else if (url === null) {
149
- return PPromise.resolve({ resultType: "segment-created" as const,
150
- resultData: null });
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 PPromise((res, rej) => {
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 PPromise((res, rej) => {
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 PPromise((res, rej) => {
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) &&
@@ -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 PPromise((resolve, reject) => {
142
+ return new Promise((resolve, reject) => {
144
143
  const { onProgress, cancelSignal } = options;
145
144
  const { url,
146
145
  headers,
package/tsconfig.json CHANGED
@@ -16,7 +16,6 @@
16
16
  "types": ["rxjs", "node", "jest"],
17
17
  "moduleResolution": "node",
18
18
  "typeRoots": [
19
- "./src/typings/pinkie.d.ts",
20
19
  "./src/typings/next-tick.d.ts",
21
20
  "./src/typings/object-assign.d.ts",
22
21
  "./src/typings/globals.d.ts",
@@ -18,7 +18,6 @@
18
18
  "module": "es2015",
19
19
  "typeRoots": [
20
20
  "./scripts/build/constants.d.ts",
21
- "./src/typings/pinkie.d.ts",
22
21
  "./src/typings/next-tick.d.ts",
23
22
  "./src/typings/object-assign.d.ts",
24
23
  "./node_modules/@types"
@@ -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;
@@ -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
- });
@@ -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;