rx-player 4.3.0-dev.2025031700 → 4.3.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.
Files changed (232) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/VERSION +1 -1
  3. package/dist/commonjs/__GENERATED_CODE/embedded_dash_wasm.d.ts.map +1 -1
  4. package/dist/commonjs/__GENERATED_CODE/embedded_dash_wasm.js +1 -1
  5. package/dist/commonjs/__GENERATED_CODE/embedded_worker.d.ts.map +1 -1
  6. package/dist/commonjs/__GENERATED_CODE/embedded_worker.js +1 -1
  7. package/dist/commonjs/compat/add_class_name.d.ts.map +1 -1
  8. package/dist/commonjs/compat/add_class_name.js +1 -4
  9. package/dist/commonjs/compat/browser_compatibility_types.d.ts.map +1 -1
  10. package/dist/commonjs/compat/browser_compatibility_types.js +0 -1
  11. package/dist/commonjs/compat/eme/custom_media_keys/webkit_media_keys.d.ts.map +1 -1
  12. package/dist/commonjs/compat/eme/custom_media_keys/webkit_media_keys.js +0 -2
  13. package/dist/commonjs/compat/eme/eme-api-implementation.js +0 -1
  14. package/dist/commonjs/compat/eme/generate_key_request.d.ts +2 -2
  15. package/dist/commonjs/compat/eme/generate_key_request.js +2 -2
  16. package/dist/commonjs/compat/is_vtt_cue.d.ts.map +1 -1
  17. package/dist/commonjs/compat/is_vtt_cue.js +0 -1
  18. package/dist/commonjs/compat/patch_webkit_source_buffer.js +1 -1
  19. package/dist/commonjs/core/main/worker/content_preparer.d.ts.map +1 -1
  20. package/dist/commonjs/core/main/worker/content_preparer.js +82 -0
  21. package/dist/commonjs/core/segment_sinks/garbage_collector.d.ts.map +1 -1
  22. package/dist/commonjs/core/segment_sinks/garbage_collector.js +4 -0
  23. package/dist/commonjs/core/stream/representation/representation_stream.d.ts.map +1 -1
  24. package/dist/commonjs/core/stream/representation/representation_stream.js +29 -45
  25. package/dist/commonjs/core/stream/representation/utils/push_init_segment.d.ts.map +1 -1
  26. package/dist/commonjs/core/stream/representation/utils/push_init_segment.js +0 -3
  27. package/dist/commonjs/core/stream/representation/utils/push_media_segment.d.ts.map +1 -1
  28. package/dist/commonjs/core/stream/representation/utils/push_media_segment.js +0 -3
  29. package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/api/index.js +1 -1
  30. package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/capabilities.d.ts +2 -2
  31. package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/capabilities.js +2 -2
  32. package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.d.ts.map +1 -1
  33. package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.js +0 -1
  34. package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.d.ts.map +1 -1
  35. package/dist/commonjs/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.js +0 -1
  36. package/dist/commonjs/main_thread/api/public_api.d.ts.map +1 -1
  37. package/dist/commonjs/main_thread/api/public_api.js +2 -3
  38. package/dist/commonjs/main_thread/decrypt/session_events_listener.d.ts.map +1 -1
  39. package/dist/commonjs/main_thread/decrypt/session_events_listener.js +26 -18
  40. package/dist/commonjs/main_thread/decrypt/utils/loaded_sessions_store.d.ts +1 -1
  41. package/dist/commonjs/main_thread/decrypt/utils/loaded_sessions_store.js +1 -1
  42. package/dist/commonjs/main_thread/init/multi_thread_content_initializer.d.ts.map +1 -1
  43. package/dist/commonjs/main_thread/init/multi_thread_content_initializer.js +5 -3
  44. package/dist/commonjs/main_thread/init/utils/update_manifest_codec_support.d.ts +5 -4
  45. package/dist/commonjs/main_thread/init/utils/update_manifest_codec_support.d.ts.map +1 -1
  46. package/dist/commonjs/main_thread/init/utils/update_manifest_codec_support.js +10 -4
  47. package/dist/commonjs/manifest/classes/manifest.js +1 -1
  48. package/dist/commonjs/manifest/classes/representation.d.ts +2 -0
  49. package/dist/commonjs/manifest/classes/representation.d.ts.map +1 -1
  50. package/dist/commonjs/manifest/classes/representation.js +1 -0
  51. package/dist/commonjs/manifest/types.d.ts +2 -0
  52. package/dist/commonjs/manifest/types.d.ts.map +1 -1
  53. package/dist/commonjs/parsers/manifest/dash/common/convert_supplemental_codecs.d.ts +1 -1
  54. package/dist/commonjs/parsers/manifest/dash/common/convert_supplemental_codecs.js +1 -1
  55. package/dist/commonjs/parsers/manifest/dash/common/indexes/tokens.js +3 -3
  56. package/dist/commonjs/parsers/manifest/dash/common/parse_representations.js +1 -1
  57. package/dist/commonjs/parsers/manifest/dash/fast-js-parser/node_parsers/utils.d.ts.map +1 -1
  58. package/dist/commonjs/parsers/manifest/dash/native-parser/node_parsers/utils.d.ts.map +1 -1
  59. package/dist/commonjs/parsers/texttracks/ttml/parse_ttml.d.ts +1 -1
  60. package/dist/commonjs/parsers/texttracks/ttml/regexps.d.ts.map +1 -1
  61. package/dist/commonjs/parsers/texttracks/ttml/regexps.js +1 -1
  62. package/dist/commonjs/parsers/texttracks/webvtt/native/set_settings_on_cue.js +1 -1
  63. package/dist/commonjs/transports/smooth/segment_loader.d.ts.map +1 -1
  64. package/dist/commonjs/utils/array_find.js +1 -1
  65. package/dist/commonjs/utils/array_find_index.js +1 -1
  66. package/dist/commonjs/utils/array_includes.js +1 -1
  67. package/dist/commonjs/utils/assert.js +1 -1
  68. package/dist/commonjs/utils/flat_map.d.ts.map +1 -1
  69. package/dist/commonjs/utils/flat_map.js +0 -1
  70. package/dist/commonjs/utils/logger.d.ts.map +1 -1
  71. package/dist/commonjs/utils/logger.js +0 -2
  72. package/dist/commonjs/utils/noop.js +1 -1
  73. package/dist/commonjs/utils/object_assign.d.ts.map +1 -1
  74. package/dist/commonjs/utils/object_assign.js +3 -4
  75. package/dist/commonjs/utils/object_values.js +1 -1
  76. package/dist/commonjs/utils/request/xhr.js +1 -1
  77. package/dist/commonjs/utils/starts_with.d.ts.map +1 -1
  78. package/dist/commonjs/utils/starts_with.js +0 -1
  79. package/dist/commonjs/utils/string_parsing.js +1 -1
  80. package/dist/commonjs/utils/url-utils.js +2 -2
  81. package/dist/commonjs/utils/weak_map_memory.d.ts.map +1 -1
  82. package/dist/commonjs/utils/weak_map_memory.js +0 -1
  83. package/dist/es2017/__GENERATED_CODE/embedded_dash_wasm.d.ts.map +1 -1
  84. package/dist/es2017/__GENERATED_CODE/embedded_dash_wasm.js +1 -1
  85. package/dist/es2017/__GENERATED_CODE/embedded_worker.d.ts.map +1 -1
  86. package/dist/es2017/__GENERATED_CODE/embedded_worker.js +1 -1
  87. package/dist/es2017/compat/add_class_name.d.ts.map +1 -1
  88. package/dist/es2017/compat/add_class_name.js +1 -4
  89. package/dist/es2017/compat/browser_compatibility_types.d.ts.map +1 -1
  90. package/dist/es2017/compat/browser_compatibility_types.js +0 -1
  91. package/dist/es2017/compat/eme/custom_media_keys/webkit_media_keys.d.ts.map +1 -1
  92. package/dist/es2017/compat/eme/custom_media_keys/webkit_media_keys.js +0 -2
  93. package/dist/es2017/compat/eme/eme-api-implementation.js +0 -1
  94. package/dist/es2017/compat/eme/generate_key_request.d.ts +2 -2
  95. package/dist/es2017/compat/eme/generate_key_request.js +2 -2
  96. package/dist/es2017/compat/is_vtt_cue.d.ts.map +1 -1
  97. package/dist/es2017/compat/is_vtt_cue.js +0 -1
  98. package/dist/es2017/compat/patch_webkit_source_buffer.js +1 -1
  99. package/dist/es2017/core/main/worker/content_preparer.d.ts.map +1 -1
  100. package/dist/es2017/core/main/worker/content_preparer.js +34 -0
  101. package/dist/es2017/core/segment_sinks/garbage_collector.d.ts.map +1 -1
  102. package/dist/es2017/core/segment_sinks/garbage_collector.js +4 -0
  103. package/dist/es2017/core/stream/representation/representation_stream.d.ts.map +1 -1
  104. package/dist/es2017/core/stream/representation/representation_stream.js +29 -45
  105. package/dist/es2017/core/stream/representation/utils/push_init_segment.d.ts.map +1 -1
  106. package/dist/es2017/core/stream/representation/utils/push_init_segment.js +0 -3
  107. package/dist/es2017/core/stream/representation/utils/push_media_segment.d.ts.map +1 -1
  108. package/dist/es2017/core/stream/representation/utils/push_media_segment.js +0 -3
  109. package/dist/es2017/experimental/tools/mediaCapabilitiesProber/api/index.js +1 -1
  110. package/dist/es2017/experimental/tools/mediaCapabilitiesProber/capabilities.d.ts +2 -2
  111. package/dist/es2017/experimental/tools/mediaCapabilitiesProber/capabilities.js +2 -2
  112. package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.d.ts.map +1 -1
  113. package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.js +0 -1
  114. package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.d.ts.map +1 -1
  115. package/dist/es2017/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.js +0 -1
  116. package/dist/es2017/main_thread/api/public_api.d.ts.map +1 -1
  117. package/dist/es2017/main_thread/api/public_api.js +2 -3
  118. package/dist/es2017/main_thread/decrypt/session_events_listener.d.ts.map +1 -1
  119. package/dist/es2017/main_thread/decrypt/session_events_listener.js +4 -6
  120. package/dist/es2017/main_thread/decrypt/utils/loaded_sessions_store.d.ts +1 -1
  121. package/dist/es2017/main_thread/decrypt/utils/loaded_sessions_store.js +1 -1
  122. package/dist/es2017/main_thread/init/multi_thread_content_initializer.d.ts.map +1 -1
  123. package/dist/es2017/main_thread/init/multi_thread_content_initializer.js +5 -3
  124. package/dist/es2017/main_thread/init/utils/update_manifest_codec_support.d.ts +5 -4
  125. package/dist/es2017/main_thread/init/utils/update_manifest_codec_support.d.ts.map +1 -1
  126. package/dist/es2017/main_thread/init/utils/update_manifest_codec_support.js +10 -4
  127. package/dist/es2017/manifest/classes/manifest.js +1 -1
  128. package/dist/es2017/manifest/classes/representation.d.ts +2 -0
  129. package/dist/es2017/manifest/classes/representation.d.ts.map +1 -1
  130. package/dist/es2017/manifest/classes/representation.js +1 -0
  131. package/dist/es2017/manifest/types.d.ts +2 -0
  132. package/dist/es2017/manifest/types.d.ts.map +1 -1
  133. package/dist/es2017/parsers/manifest/dash/common/convert_supplemental_codecs.d.ts +1 -1
  134. package/dist/es2017/parsers/manifest/dash/common/convert_supplemental_codecs.js +1 -1
  135. package/dist/es2017/parsers/manifest/dash/common/indexes/tokens.js +3 -3
  136. package/dist/es2017/parsers/manifest/dash/common/parse_representations.js +1 -1
  137. package/dist/es2017/parsers/manifest/dash/fast-js-parser/node_parsers/utils.d.ts.map +1 -1
  138. package/dist/es2017/parsers/manifest/dash/native-parser/node_parsers/utils.d.ts.map +1 -1
  139. package/dist/es2017/parsers/texttracks/ttml/parse_ttml.d.ts +1 -1
  140. package/dist/es2017/parsers/texttracks/ttml/regexps.d.ts.map +1 -1
  141. package/dist/es2017/parsers/texttracks/ttml/regexps.js +1 -1
  142. package/dist/es2017/parsers/texttracks/webvtt/native/set_settings_on_cue.js +1 -1
  143. package/dist/es2017/transports/smooth/segment_loader.d.ts.map +1 -1
  144. package/dist/es2017/utils/array_find.js +1 -1
  145. package/dist/es2017/utils/array_find_index.js +1 -1
  146. package/dist/es2017/utils/array_includes.js +1 -1
  147. package/dist/es2017/utils/assert.js +1 -1
  148. package/dist/es2017/utils/flat_map.d.ts.map +1 -1
  149. package/dist/es2017/utils/flat_map.js +0 -1
  150. package/dist/es2017/utils/logger.d.ts.map +1 -1
  151. package/dist/es2017/utils/logger.js +0 -2
  152. package/dist/es2017/utils/noop.js +1 -1
  153. package/dist/es2017/utils/object_assign.d.ts.map +1 -1
  154. package/dist/es2017/utils/object_assign.js +3 -4
  155. package/dist/es2017/utils/object_values.js +1 -1
  156. package/dist/es2017/utils/request/xhr.js +1 -1
  157. package/dist/es2017/utils/starts_with.d.ts.map +1 -1
  158. package/dist/es2017/utils/starts_with.js +0 -1
  159. package/dist/es2017/utils/string_parsing.js +1 -1
  160. package/dist/es2017/utils/url-utils.js +2 -2
  161. package/dist/es2017/utils/weak_map_memory.d.ts.map +1 -1
  162. package/dist/es2017/utils/weak_map_memory.js +0 -1
  163. package/dist/mpd-parser.wasm +0 -0
  164. package/dist/rx-player.js +80 -107
  165. package/dist/rx-player.min.js +13 -13
  166. package/dist/worker.js +4 -4
  167. package/eslint.config.mjs +423 -0
  168. package/package.json +25 -20
  169. package/src/__GENERATED_CODE/embedded_dash_wasm.ts +1 -1
  170. package/src/__GENERATED_CODE/embedded_worker.ts +1 -1
  171. package/src/compat/__tests__/should_wait_for_data_before_loaded.test.ts +0 -1
  172. package/src/compat/add_class_name.ts +1 -4
  173. package/src/compat/browser_compatibility_types.ts +0 -1
  174. package/src/compat/eme/custom_media_keys/webkit_media_keys.ts +0 -2
  175. package/src/compat/eme/eme-api-implementation.ts +0 -1
  176. package/src/compat/eme/generate_key_request.ts +2 -2
  177. package/src/compat/is_vtt_cue.ts +0 -1
  178. package/src/compat/patch_webkit_source_buffer.ts +1 -1
  179. package/src/core/main/worker/content_preparer.ts +35 -1
  180. package/src/core/segment_sinks/garbage_collector.ts +4 -0
  181. package/src/core/stream/representation/representation_stream.ts +29 -64
  182. package/src/core/stream/representation/utils/push_init_segment.ts +0 -3
  183. package/src/core/stream/representation/utils/push_media_segment.ts +0 -3
  184. package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/DRMInfos.test.ts +0 -3
  185. package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/HDCPPolicy.test.ts +0 -2
  186. package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/decodingInfos.test.ts +0 -2
  187. package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/mediaContentType.test.ts +0 -2
  188. package/src/experimental/tools/mediaCapabilitiesProber/__tests__/probers/mediaDisplayInfos.test.ts +0 -7
  189. package/src/experimental/tools/mediaCapabilitiesProber/api/index.ts +1 -1
  190. package/src/experimental/tools/mediaCapabilitiesProber/capabilities.ts +2 -2
  191. package/src/experimental/tools/mediaCapabilitiesProber/probers/mediaContentType.ts +0 -1
  192. package/src/experimental/tools/mediaCapabilitiesProber/probers/mediaDisplayInfos.ts +0 -1
  193. package/src/main_thread/api/public_api.ts +2 -3
  194. package/src/main_thread/decrypt/session_events_listener.ts +9 -8
  195. package/src/main_thread/decrypt/utils/loaded_sessions_store.ts +1 -1
  196. package/src/main_thread/init/multi_thread_content_initializer.ts +5 -2
  197. package/src/main_thread/init/utils/__tests__/update_manifest_codec_support.test.ts +45 -2
  198. package/src/main_thread/init/utils/update_manifest_codec_support.ts +13 -3
  199. package/src/manifest/classes/manifest.ts +1 -1
  200. package/src/manifest/classes/representation.ts +3 -0
  201. package/src/manifest/types.ts +2 -0
  202. package/src/parsers/manifest/dash/common/convert_supplemental_codecs.ts +1 -1
  203. package/src/parsers/manifest/dash/common/indexes/tokens.ts +3 -3
  204. package/src/parsers/manifest/dash/common/parse_representations.ts +1 -1
  205. package/src/parsers/manifest/dash/fast-js-parser/node_parsers/__tests__/AdaptationSet.test.ts +3 -7
  206. package/src/parsers/manifest/dash/fast-js-parser/node_parsers/__tests__/ContentComponent.test.ts +1 -1
  207. package/src/parsers/manifest/dash/fast-js-parser/node_parsers/__tests__/ContentProtection.test.ts +1 -1
  208. package/src/parsers/manifest/dash/native-parser/node_parsers/__tests__/AdaptationSet.test.ts +3 -3
  209. package/src/parsers/manifest/dash/native-parser/node_parsers/__tests__/ContentComponent.test.ts +1 -1
  210. package/src/parsers/manifest/dash/native-parser/node_parsers/__tests__/ContentProtection.test.ts +2 -2
  211. package/src/parsers/texttracks/ttml/parse_ttml.ts +1 -1
  212. package/src/parsers/texttracks/ttml/regexps.ts +1 -1
  213. package/src/parsers/texttracks/webvtt/native/set_settings_on_cue.ts +1 -1
  214. package/src/utils/__tests__/array_find.test.ts +1 -1
  215. package/src/utils/__tests__/array_find_index.test.ts +0 -1
  216. package/src/utils/__tests__/array_includes.test.ts +1 -1
  217. package/src/utils/__tests__/id_generator.test.ts +0 -2
  218. package/src/utils/array_find.ts +1 -1
  219. package/src/utils/array_find_index.ts +1 -1
  220. package/src/utils/array_includes.ts +1 -1
  221. package/src/utils/assert.ts +1 -1
  222. package/src/utils/flat_map.ts +0 -1
  223. package/src/utils/logger.ts +0 -2
  224. package/src/utils/noop.ts +1 -1
  225. package/src/utils/object_assign.ts +3 -4
  226. package/src/utils/object_values.ts +1 -1
  227. package/src/utils/request/xhr.ts +2 -2
  228. package/src/utils/starts_with.ts +0 -1
  229. package/src/utils/string_parsing.ts +1 -1
  230. package/src/utils/url-utils.ts +2 -2
  231. package/src/utils/weak_map_memory.ts +0 -1
  232. package/vitest.config.mjs +34 -28
@@ -0,0 +1,423 @@
1
+ import { defineConfig, globalIgnores } from "eslint/config";
2
+ import jsLint from "@eslint/js";
3
+ import tsLint from "typescript-eslint";
4
+ import _import from "eslint-plugin-import";
5
+ import jsdoc from "eslint-plugin-jsdoc";
6
+ import ban from "eslint-plugin-ban";
7
+ import typescriptEslint from "@typescript-eslint/eslint-plugin";
8
+ import tsParser from "@typescript-eslint/parser";
9
+
10
+ export default defineConfig([
11
+ globalIgnores([
12
+ "**/node_modules",
13
+ "**/*.log",
14
+ "**/*.keys",
15
+ "demo/bundle.js",
16
+ "demo/lib.js",
17
+ "tools/tests/coverage/",
18
+ "dist/*",
19
+ "!dist/rx-player.js",
20
+ "!dist/rx-player.min.js",
21
+ "**/test-output.xml",
22
+ "src/__GENERATED_CODE",
23
+ ]),
24
+ jsLint.configs.recommended,
25
+ tsLint.configs.recommended,
26
+ {
27
+ plugins: {
28
+ import: _import,
29
+ jsdoc,
30
+ ban,
31
+ "@typescript-eslint": typescriptEslint,
32
+ },
33
+
34
+ languageOptions: {
35
+ parser: tsParser,
36
+ ecmaVersion: 5,
37
+ sourceType: "module",
38
+
39
+ parserOptions: {
40
+ project: "tsconfig.eslint.json",
41
+ },
42
+ },
43
+
44
+ rules: {
45
+ "ban/ban": [
46
+ 2,
47
+ {
48
+ name: ["*", "finally"],
49
+ message:
50
+ 'Promise.prototype.finally is forbidden due to poor support from older devices.\nNote that this linting rule just bans naively all "finally" method calls, if in this case it wasn\'t called on a Promise, you can safely ignore this error',
51
+ },
52
+ ],
53
+
54
+ "@typescript-eslint/adjacent-overload-signatures": "error",
55
+
56
+ "@typescript-eslint/array-type": [
57
+ "error",
58
+ {
59
+ default: "array-simple",
60
+ },
61
+ ],
62
+
63
+ "@typescript-eslint/await-thenable": "error",
64
+
65
+ "@typescript-eslint/no-restricted-types": [
66
+ "error",
67
+ {
68
+ types: {
69
+ Object: {
70
+ message: "Avoid using the `Object` type. Did you mean `object`?",
71
+ },
72
+
73
+ Function: {
74
+ message:
75
+ "Avoid using the `Function` type. Prefer a specific function type, like `() => void`.",
76
+ },
77
+
78
+ Boolean: {
79
+ message: "Avoid using the `Boolean` type. Did you mean `boolean`?",
80
+ },
81
+
82
+ Number: {
83
+ message: "Avoid using the `Number` type. Did you mean `number`?",
84
+ },
85
+
86
+ String: {
87
+ message: "Avoid using the `String` type. Did you mean `string`?",
88
+ },
89
+
90
+ Symbol: {
91
+ message: "Avoid using the `Symbol` type. Did you mean `symbol`?",
92
+ },
93
+
94
+ HTMLMediaElement: {
95
+ message:
96
+ "Avoid relying on `HTMLMediaElement` directly unless it is API-facing. Prefer our more restricted `IMediaElement` type",
97
+ },
98
+
99
+ MediaSource: {
100
+ message:
101
+ "Avoid relying on `MediaSource` directly unless it is API-facing. Prefer our more restricted `IMediaSource` type",
102
+ },
103
+
104
+ SourceBuffer: {
105
+ message:
106
+ "Avoid relying on `SourceBuffer` directly unless it is API-facing. Prefer our more restricted `ISourceBuffer` type",
107
+ },
108
+
109
+ SourceBufferList: {
110
+ message:
111
+ "Avoid relying on `SourceBufferList` directly unless it is API-facing. Prefer our more restricted `ISourceBufferList` type",
112
+ },
113
+
114
+ MediaKeySystemAccess: {
115
+ message:
116
+ "Avoid relying on `MediaKeySystemAccess` directly unless it is API-facing. Prefer our more restricted `IMediaKeySystemAccess` type",
117
+ },
118
+
119
+ MediaKeys: {
120
+ message:
121
+ "Avoid relying on `MediaKeys` directly unless it is API-facing. Prefer our more restricted `IMediaKeys` type",
122
+ },
123
+
124
+ MediaKeySession: {
125
+ message:
126
+ "Avoid relying on `MediaKeySession` directly unless it is API-facing. Prefer our more restricted `IMediaKeySession` type",
127
+ },
128
+ },
129
+ },
130
+ ],
131
+
132
+ "@typescript-eslint/consistent-type-assertions": [
133
+ "error",
134
+ {
135
+ assertionStyle: "as",
136
+ objectLiteralTypeAssertions: "allow",
137
+ },
138
+ ],
139
+
140
+ "@typescript-eslint/prefer-promise-reject-errors": "off",
141
+ "@typescript-eslint/only-throw-error": "off",
142
+ "@typescript-eslint/consistent-type-definitions": "error",
143
+ "@typescript-eslint/dot-notation": "error",
144
+
145
+ "@typescript-eslint/explicit-member-accessibility": [
146
+ "off",
147
+ {
148
+ accessibility: "explicit",
149
+ },
150
+ ],
151
+
152
+ "@typescript-eslint/consistent-type-imports": "error",
153
+ "@typescript-eslint/consistent-type-exports": "error",
154
+
155
+ "@typescript-eslint/naming-convention": [
156
+ "error",
157
+ {
158
+ selector: "property",
159
+ format: ["camelCase", "UPPER_CASE", "PascalCase"],
160
+ leadingUnderscore: "allow",
161
+ trailingUnderscore: "allow",
162
+
163
+ filter: {
164
+ regex: "^(__esModule$)|(__priv_)",
165
+ match: false,
166
+ },
167
+ },
168
+ {
169
+ selector: "method",
170
+ format: ["camelCase"],
171
+ leadingUnderscore: "allow",
172
+ trailingUnderscore: "allow",
173
+ },
174
+ {
175
+ selector: "variable",
176
+ format: ["camelCase", "UPPER_CASE", "PascalCase"],
177
+ leadingUnderscore: "allow",
178
+ trailingUnderscore: "allow",
179
+ },
180
+ {
181
+ selector: "parameter",
182
+ format: ["camelCase"],
183
+ leadingUnderscore: "allow",
184
+
185
+ filter: {
186
+ regex: "^__priv_",
187
+ match: false,
188
+ },
189
+ },
190
+ {
191
+ selector: "memberLike",
192
+ modifiers: ["private"],
193
+ format: ["camelCase"],
194
+ leadingUnderscore: "require",
195
+ },
196
+ {
197
+ selector: "enum",
198
+ format: ["PascalCase", "UPPER_CASE"],
199
+ leadingUnderscore: "allow",
200
+ },
201
+ {
202
+ selector: "typeLike",
203
+ format: ["PascalCase"],
204
+ leadingUnderscore: "allow",
205
+ },
206
+ ],
207
+
208
+ "@typescript-eslint/no-duplicate-type-constituents": [
209
+ "error",
210
+ {
211
+ ignoreIntersections: false,
212
+ ignoreUnions: true,
213
+ },
214
+ ],
215
+
216
+ "@typescript-eslint/no-empty-function": "error",
217
+ "@typescript-eslint/no-empty-interface": "error",
218
+ "@typescript-eslint/no-explicit-any": "error",
219
+ "@typescript-eslint/no-extraneous-class": "error",
220
+ "@typescript-eslint/no-floating-promises": "error",
221
+ "@typescript-eslint/no-for-in-array": "error",
222
+ "@typescript-eslint/no-implied-eval": "error",
223
+ "@typescript-eslint/no-inferrable-types": "off",
224
+ "@typescript-eslint/no-misused-new": "error",
225
+ "@typescript-eslint/no-namespace": "error",
226
+ "@typescript-eslint/no-non-null-assertion": "error",
227
+ "@typescript-eslint/no-redundant-type-constituents": "error",
228
+ "@typescript-eslint/no-this-alias": "error",
229
+ "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
230
+ "@typescript-eslint/no-unnecessary-qualifier": "error",
231
+ "@typescript-eslint/no-unnecessary-type-arguments": "error",
232
+ "@typescript-eslint/no-unnecessary-type-assertion": "error",
233
+ "@typescript-eslint/no-unsafe-argument": "error",
234
+ "@typescript-eslint/no-unsafe-assignment": "error",
235
+ "@typescript-eslint/no-unsafe-enum-comparison": ["off"],
236
+ "@typescript-eslint/no-unsafe-member-access": "error",
237
+ "@typescript-eslint/no-unused-expressions": "error",
238
+ "@typescript-eslint/no-use-before-define": "off",
239
+ "@typescript-eslint/no-var-requires": "error",
240
+ "@typescript-eslint/prefer-for-of": "off",
241
+ "@typescript-eslint/prefer-function-type": "error",
242
+ "@typescript-eslint/prefer-namespace-keyword": "error",
243
+ "@typescript-eslint/prefer-readonly": "off",
244
+ "@typescript-eslint/promise-function-async": "off",
245
+ "@typescript-eslint/restrict-template-expressions": "error",
246
+
247
+ "@typescript-eslint/no-unused-vars": [
248
+ "error",
249
+ {
250
+ args: "all",
251
+ argsIgnorePattern: "^_",
252
+ caughtErrors: "none",
253
+ destructuredArrayIgnorePattern: "^_",
254
+ varsIgnorePattern: "^_",
255
+ },
256
+ ],
257
+
258
+ "@typescript-eslint/no-shadow": ["error"],
259
+ "@typescript-eslint/restrict-plus-operands": "error",
260
+
261
+ "@typescript-eslint/strict-boolean-expressions": [
262
+ "error",
263
+ {
264
+ allowAny: false,
265
+ allowNullableBoolean: false,
266
+ allowNullableEnum: false,
267
+ allowNullableNumber: false,
268
+ allowNullableObject: false,
269
+ allowNullableString: false,
270
+ allowNumber: false,
271
+ allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
272
+ allowString: false,
273
+ },
274
+ ],
275
+
276
+ "@typescript-eslint/triple-slash-reference": [
277
+ "error",
278
+ {
279
+ path: "always",
280
+ types: "prefer-import",
281
+ lib: "always",
282
+ },
283
+ ],
284
+
285
+ "@typescript-eslint/unbound-method": "error",
286
+ "@typescript-eslint/unified-signatures": "error",
287
+ "arrow-body-style": "off",
288
+ "arrow-parens": ["off", "always"],
289
+
290
+ complexity: [
291
+ "off",
292
+ {
293
+ max: 20,
294
+ },
295
+ ],
296
+
297
+ "constructor-super": "error",
298
+ curly: "error",
299
+ "default-case": "off",
300
+ eqeqeq: "error",
301
+ "guard-for-in": "warn",
302
+ "id-blacklist": "off",
303
+ "id-match": "off",
304
+ "import/no-default-export": "off",
305
+ "import/no-deprecated": "error",
306
+
307
+ "import/no-extraneous-dependencies": [
308
+ "error",
309
+ {
310
+ devDependencies: ["**/*.test.ts", "**/__tests__/**"],
311
+ },
312
+ ],
313
+
314
+ "import/no-internal-modules": "off",
315
+
316
+ "import/order": [
317
+ "error",
318
+ {
319
+ alphabetize: {
320
+ order: "asc",
321
+ caseInsensitive: true,
322
+ },
323
+ },
324
+ ],
325
+
326
+ "import/no-duplicates": "error",
327
+ "jsdoc/check-alignment": "error",
328
+ "jsdoc/no-types": "off",
329
+ "max-classes-per-file": ["warn", 5],
330
+ "max-lines": ["off", 300],
331
+ "newline-per-chained-call": "off",
332
+ "no-bitwise": "off",
333
+ "no-caller": "error",
334
+ "no-console": "error",
335
+ "no-debugger": "error",
336
+ "no-duplicate-case": "error",
337
+ "no-empty": "error",
338
+ "no-eval": "error",
339
+ "no-fallthrough": "error",
340
+ "no-invalid-this": "error",
341
+ "no-magic-numbers": "off",
342
+ "no-new-wrappers": "error",
343
+ "no-nested-ternary": "error",
344
+ "no-param-reassign": "error",
345
+ "no-return-await": "error",
346
+ "no-sequences": "error",
347
+ "no-shadow": "off",
348
+ "no-sparse-arrays": "error",
349
+ "no-template-curly-in-string": "error",
350
+ "no-throw-literal": "error",
351
+ "no-undef-init": "error",
352
+ "no-unsafe-finally": "error",
353
+ "no-unused-labels": "error",
354
+ "no-var": "error",
355
+ "no-void": "error",
356
+ "object-shorthand": "error",
357
+ "one-var": ["error", "never"],
358
+ "prefer-const": "error",
359
+ "prefer-spread": "error",
360
+ "prefer-object-spread": "error",
361
+ "prefer-template": "off",
362
+
363
+ "no-restricted-properties": [
364
+ "error",
365
+ {
366
+ object: "performance",
367
+ property: "now",
368
+ message:
369
+ "Avoid using `performance.now` directly as timestamps may be different in the worker and the main thread and some platforms don't have it in a Worker environment. Please use the `getMonotonicTimeStamp` util instead.",
370
+ },
371
+ {
372
+ object: "window",
373
+ message:
374
+ "`window` doesn't work in Node.JS and only works when JavaScript is running in the main thread. Please import `globalScope` instead.",
375
+ },
376
+ {
377
+ object: "Object",
378
+ property: "assign",
379
+ message: "Not available in IE11, use `objectAssign` utils instead.",
380
+ },
381
+ {
382
+ object: "Object",
383
+ property: "values",
384
+ message: "Not available in IE11, use `objectValues` utils instead.",
385
+ },
386
+ {
387
+ property: "includes",
388
+ message: "Not available in IE11, use another method such as `indexOf` instead.",
389
+ },
390
+ {
391
+ property: "find",
392
+ message: "Not available in IE11, use `arrayFind` utils instead.",
393
+ },
394
+ {
395
+ property: "findIndex",
396
+ message: "Not available in IE11, use `arrayFindIndex` utils instead.",
397
+ },
398
+ {
399
+ property: "startsWith",
400
+ message: "Not available in IE11, use `startsWith` utils instead.",
401
+ },
402
+ {
403
+ property: "substr",
404
+ message: "Please use `substring` instead.",
405
+ },
406
+ ],
407
+
408
+ radix: "error",
409
+
410
+ "spaced-comment": [
411
+ "error",
412
+ "always",
413
+ {
414
+ markers: ["/"],
415
+ },
416
+ ],
417
+
418
+ "use-isnan": "error",
419
+ "valid-typeof": "error",
420
+ yoda: "error",
421
+ },
422
+ },
423
+ ]);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rx-player",
3
3
  "author": "Canal+",
4
- "version": "4.3.0-dev.2025031700",
4
+ "version": "4.3.0",
5
5
  "description": "Canal+ HTML5 Video Player",
6
6
  "main": "./dist/commonjs/index.js",
7
7
  "module": "./dist/es2017/index.js",
@@ -174,10 +174,11 @@
174
174
  "fmt:prettier:check": "prettier . --check",
175
175
  "fmt:rust": "cd ./src/parsers/manifest/dash/wasm-parser && cargo fmt",
176
176
  "fmt:rust:check": "cd ./src/parsers/manifest/dash/wasm-parser && cargo fmt --check",
177
- "lint": "eslint src -c .eslintrc.js",
178
- "lint:demo": "eslint -c demo/.eslintrc.js demo/scripts",
179
- "lint:scripts": "eslint -c scripts/.eslintrc.js --ext .js --ext .mjs --ext .cjs scripts",
180
- "lint:tests": "eslint tests/**/*.js --ignore-pattern '/tests/performance/bundle*'",
177
+ "lint": "eslint src -c eslint.config.mjs",
178
+ "lint:all": "npm run lint && npm run lint:demo && npm run lint:scripts && npm run lint:tests",
179
+ "lint:demo": "eslint -c demo/eslint.config.mjs demo/scripts",
180
+ "lint:scripts": "eslint -c scripts/eslint.config.mjs --ext .js --ext .mjs --ext .cjs scripts",
181
+ "lint:tests": "eslint -c tests/eslint.config.mjs tests",
181
182
  "list": "node scripts/list-npm-scripts.mjs",
182
183
  "prepublishOnly": "npm run build:all",
183
184
  "releases:changelog": "node ./scripts/update_changelog.mjs",
@@ -209,32 +210,34 @@
209
210
  },
210
211
  "devDependencies": {
211
212
  "@canalplus/readme.doc": "0.6.0",
212
- "@types/react": "19.0.8",
213
- "@types/react-dom": "19.0.3",
214
- "@typescript-eslint/eslint-plugin": "^8.24.0",
215
- "@typescript-eslint/parser": "^8.24.0",
216
- "@vitest/browser": "^2.1.9",
217
- "core-js": "3.40.0",
213
+ "@eslint/js": "^9.23.0",
214
+ "@types/react": "19.0.12",
215
+ "@types/react-dom": "19.0.4",
216
+ "@typescript-eslint/eslint-plugin": "^8.28.0",
217
+ "@typescript-eslint/parser": "^8.28.0",
218
+ "@vitest/browser": "^3.0.9",
219
+ "core-js": "3.41.0",
218
220
  "cross-env": "^7.0.3",
219
- "esbuild": "0.25.0",
220
- "eslint": "8.57.1",
221
- "eslint-config-prettier": "^10.0.1",
221
+ "esbuild": "0.25.1",
222
+ "eslint": "9.23.0",
223
+ "eslint-config-prettier": "^10.1.1",
222
224
  "eslint-plugin-ban": "2.0.0",
223
225
  "eslint-plugin-import": "2.31.0",
224
- "eslint-plugin-jsdoc": "50.6.3",
226
+ "eslint-plugin-jsdoc": "50.6.9",
225
227
  "eslint-plugin-react": "7.37.4",
226
228
  "esm": "3.2.25",
227
229
  "github-buttons": "2.29.1",
228
- "html-entities": "2.5.2",
230
+ "html-entities": "2.5.3",
229
231
  "jsdom": "^26.0.0",
230
- "prettier": "^3.5.0",
232
+ "prettier": "^3.5.3",
231
233
  "react": "19.0.0",
232
234
  "react-dom": "19.0.0",
233
235
  "regenerator-runtime": "0.14.1",
234
236
  "semver": "7.7.1",
235
- "typescript": "5.7.3",
236
- "vitest": "2.1.9",
237
- "webdriverio": "9.9.0"
237
+ "typescript": "5.8.2",
238
+ "typescript-eslint": "^8.28.0",
239
+ "vitest": "3.0.9",
240
+ "webdriverio": "9.12.1"
238
241
  },
239
242
  "scripts-list": {
240
243
  " INFO ": "---- This field is read by the `list` npm script and allows to guide you through the RxPlayer's npm scripts ----",
@@ -256,7 +259,9 @@
256
259
  "check:types": "Check TypeScript typings in src",
257
260
  "check:types:watch": "Check TypeScript typings in src each time files change",
258
261
  "lint": "Lint rx-player source files",
262
+ "lint:all": "Lint all RxPlayer JS files, including scripts, demo, integration tests etc.",
259
263
  "lint:demo": "Lint demo source files",
264
+ "lint:scripts": "Lint our JS scripts in the scripts/ directory",
260
265
  "lint:tests": "Lint integration tests source files",
261
266
  "fmt:prettier": "Automatically format JavaScript, TypeScript, JSON, XML, HTML, YML and Markdown files",
262
267
  "fmt:prettier:check": "Check that JavaScript, TypeScript, JSON, XML, HTML, YML and Markdown files are well-formatted",