rx-player 4.5.0-dev.2026021900 → 4.5.0-dev.2026031700

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 (100) hide show
  1. package/CHANGELOG.md +13 -3
  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/core/cmcd/cmcd_data_builder.js +2 -2
  8. package/dist/commonjs/core/entry/content_preparer.d.ts +1 -6
  9. package/dist/commonjs/core/entry/content_preparer.d.ts.map +1 -1
  10. package/dist/commonjs/core/entry/content_preparer.js +2 -125
  11. package/dist/commonjs/core/entry/core_entry.d.ts +1 -1
  12. package/dist/commonjs/core/entry/core_entry.d.ts.map +1 -1
  13. package/dist/commonjs/core/entry/core_entry.js +2 -7
  14. package/dist/commonjs/core/entry/core_text_displayer_interface.d.ts.map +1 -1
  15. package/dist/commonjs/core/entry/core_text_displayer_interface.js +3 -1
  16. package/dist/commonjs/core/entry/index.d.ts +1 -1
  17. package/dist/commonjs/core/entry/index.d.ts.map +1 -1
  18. package/dist/commonjs/core/entry/utils.d.ts +64 -0
  19. package/dist/commonjs/core/entry/utils.d.ts.map +1 -1
  20. package/dist/commonjs/core/entry/utils.js +165 -0
  21. package/dist/commonjs/core/fetchers/segment/segment_queue.d.ts +5 -6
  22. package/dist/commonjs/core/fetchers/segment/segment_queue.d.ts.map +1 -1
  23. package/dist/commonjs/core/fetchers/thumbnails/thumbnail_fetcher.d.ts.map +1 -1
  24. package/dist/commonjs/core/fetchers/thumbnails/thumbnail_fetcher.js +34 -30
  25. package/dist/commonjs/experimental/features/worker/index.d.ts +2 -1
  26. package/dist/commonjs/experimental/features/worker/index.d.ts.map +1 -1
  27. package/dist/commonjs/experimental/features/worker/index.js +4 -3
  28. package/dist/commonjs/main_thread/api/public_api.js +3 -3
  29. package/dist/commonjs/parsers/texttracks/ttml/html/apply_line_height.d.ts.map +1 -1
  30. package/dist/commonjs/parsers/texttracks/ttml/html/apply_line_height.js +16 -1
  31. package/dist/es2017/__GENERATED_CODE/embedded_dash_wasm.d.ts.map +1 -1
  32. package/dist/es2017/__GENERATED_CODE/embedded_dash_wasm.js +1 -1
  33. package/dist/es2017/__GENERATED_CODE/embedded_worker.d.ts.map +1 -1
  34. package/dist/es2017/__GENERATED_CODE/embedded_worker.js +1 -1
  35. package/dist/es2017/core/cmcd/cmcd_data_builder.js +2 -2
  36. package/dist/es2017/core/entry/content_preparer.d.ts +1 -6
  37. package/dist/es2017/core/entry/content_preparer.d.ts.map +1 -1
  38. package/dist/es2017/core/entry/content_preparer.js +1 -76
  39. package/dist/es2017/core/entry/core_entry.d.ts +1 -1
  40. package/dist/es2017/core/entry/core_entry.d.ts.map +1 -1
  41. package/dist/es2017/core/entry/core_entry.js +2 -7
  42. package/dist/es2017/core/entry/core_text_displayer_interface.d.ts.map +1 -1
  43. package/dist/es2017/core/entry/core_text_displayer_interface.js +3 -1
  44. package/dist/es2017/core/entry/index.d.ts +1 -1
  45. package/dist/es2017/core/entry/index.d.ts.map +1 -1
  46. package/dist/es2017/core/entry/utils.d.ts +64 -0
  47. package/dist/es2017/core/entry/utils.d.ts.map +1 -1
  48. package/dist/es2017/core/entry/utils.js +98 -0
  49. package/dist/es2017/core/fetchers/segment/segment_queue.d.ts +5 -6
  50. package/dist/es2017/core/fetchers/segment/segment_queue.d.ts.map +1 -1
  51. package/dist/es2017/core/fetchers/thumbnails/thumbnail_fetcher.d.ts.map +1 -1
  52. package/dist/es2017/core/fetchers/thumbnails/thumbnail_fetcher.js +21 -16
  53. package/dist/es2017/experimental/features/worker/index.d.ts +2 -1
  54. package/dist/es2017/experimental/features/worker/index.d.ts.map +1 -1
  55. package/dist/es2017/experimental/features/worker/index.js +2 -3
  56. package/dist/es2017/main_thread/api/public_api.js +3 -3
  57. package/dist/es2017/parsers/texttracks/ttml/html/apply_line_height.d.ts.map +1 -1
  58. package/dist/es2017/parsers/texttracks/ttml/html/apply_line_height.js +16 -1
  59. package/dist/mpd-parser.wasm +0 -0
  60. package/dist/worker.js +8 -8
  61. package/package.json +19 -22
  62. package/src/__GENERATED_CODE/embedded_dash_wasm.ts +1 -1
  63. package/src/__GENERATED_CODE/embedded_worker.ts +1 -1
  64. package/src/core/adaptive/__tests__/adaptive_representation_selector.test.ts +734 -0
  65. package/src/core/adaptive/__tests__/guess_based_chooser.test.ts +5 -2
  66. package/src/core/adaptive/utils/__tests__/bandwidth_estimator.test.ts +117 -0
  67. package/src/core/adaptive/utils/__tests__/last_estimate_storage.test.ts +76 -0
  68. package/src/core/adaptive/utils/__tests__/pending_requests_store.test.ts +5 -2
  69. package/src/core/adaptive/utils/__tests__/representation_score_calculator.test.ts +4 -2
  70. package/src/core/cmcd/__tests__/cmcd_data_builder.test.ts +464 -0
  71. package/src/core/cmcd/cmcd_data_builder.ts +2 -2
  72. package/src/core/entry/__tests__/FreezeResolver.test.ts +1 -1
  73. package/src/core/entry/__tests__/content_time_boundaries_observer.test.ts +1 -2
  74. package/src/core/entry/__tests__/core_text_displayer_interface.test.ts +205 -0
  75. package/src/core/entry/__tests__/get_buffered_data_per_media_buffer.test.ts +95 -0
  76. package/src/core/entry/__tests__/track_choice_setter.test.ts +288 -0
  77. package/src/core/entry/__tests__/utils.test.ts +309 -0
  78. package/src/core/entry/content_preparer.ts +7 -118
  79. package/src/core/entry/core_entry.ts +7 -14
  80. package/src/core/entry/core_text_displayer_interface.ts +3 -1
  81. package/src/core/entry/index.ts +1 -1
  82. package/src/core/entry/utils.ts +151 -0
  83. package/src/core/fetchers/__tests__/cdn_prioritizer.test.ts +166 -0
  84. package/src/core/fetchers/manifest/__tests__/manifest_fetcher.test.ts +803 -0
  85. package/src/core/fetchers/segment/__tests__/segment_fetcher.test.ts +872 -0
  86. package/src/core/fetchers/segment/__tests__/segment_queue.test.ts +557 -0
  87. package/src/core/fetchers/segment/segment_queue.ts +5 -6
  88. package/src/core/fetchers/thumbnails/__tests__/thumbnail_fetcher.test.ts +435 -0
  89. package/src/core/fetchers/thumbnails/thumbnail_fetcher.ts +28 -20
  90. package/src/core/fetchers/utils/__tests__/schedule_request.test.ts +331 -0
  91. package/src/core/stream/adaptation/__tests__/get_representations_switch_strategy.test.ts +4 -3
  92. package/src/core/stream/representation/utils/__tests__/append_segment_to_buffer.test.ts +1 -1
  93. package/src/core/stream/representation/utils/__tests__/get_segment_priority.test.ts +1 -1
  94. package/src/core/stream/representation/utils/__tests__/push_init_segment.test.ts +1 -1
  95. package/src/core/stream/representation/utils/__tests__/push_media_segment.test.ts +1 -1
  96. package/src/experimental/features/worker/index.ts +2 -4
  97. package/src/main_thread/api/public_api.ts +3 -3
  98. package/src/mse/__tests__/main_media_source_interface.test.ts +846 -0
  99. package/src/parsers/texttracks/ttml/html/apply_line_height.ts +16 -1
  100. package/src/utils/__tests__/base64.test.ts +159 -191
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rx-player",
3
3
  "author": "Canal+",
4
- "version": "4.5.0-dev.2026021900",
4
+ "version": "4.5.0-dev.2026031700",
5
5
  "description": "Canal+ HTML5 Video Player",
6
6
  "main": "./dist/commonjs/index.js",
7
7
  "module": "./dist/es2017/index.js",
@@ -168,16 +168,13 @@
168
168
  "bundle": "node ./scripts/run_bundler.mjs src/index.ts --production-mode --globals --name \"RxPlayer default bundle\" -o dist/rx-player.js",
169
169
  "bundle:min": "node ./scripts/run_bundler.mjs src/index.ts --production-mode --globals --name \"RxPlayer minified bundle\" -o dist/rx-player.min.js --minify",
170
170
  "certificate": "bash ./scripts/generate_certificate.sh",
171
- "check": "npm run check:types && npm run lint && npm run check:types:unit_tests",
172
- "check:all": "npm run check:types && npm run lint && npm run lint:demo && npm run lint:tests && npm run lint:scripts",
173
- "check:demo": "npm run check:demo:types && npm run lint:demo",
174
- "check:demo:types": "tsc --noEmit --project demo/",
175
- "clean:build": "node ./scripts/utils/remove_dir.mjs dist",
176
- "check:types": "tsc --noEmit --project .",
177
- "check:types:unit_tests": "tsc --noEmit --project ./tsconfig.unit-tests.json",
178
- "check:types:watch": "tsc --noEmit --watch --project .",
171
+ "check": "npm run types && npm run lint && npm run types:unit_tests",
172
+ "check:all": "npm run types:all && npm run lint:all",
173
+ "check:demo": "npm run types:demo && npm run lint:demo",
174
+ "clean": "node ./scripts/utils/remove_dir.mjs dist",
179
175
  "demo": "node ./scripts/build_demo.mjs --production-mode",
180
176
  "doc": "readme.doc --clean --input doc/ --output doc/generated -p \"$(cat VERSION)\"",
177
+ "fmt": "npm run fmt:prettier && npm run fmt:rust",
181
178
  "fmt:prettier": "prettier --write .",
182
179
  "fmt:prettier:check": "prettier . --check",
183
180
  "fmt:rust": "cd ./src/parsers/manifest/dash/wasm-parser && cargo fmt",
@@ -205,9 +202,11 @@
205
202
  "test:memory": "npm run --silent test:integration:notice && cross-env BROWSER_CONFIG=chrome vitest run tests/memory",
206
203
  "test:memory:chrome:watch": "npm run --silent test:integration:notice && cross-env BROWSER_CONFIG=chrome vitest watch tests/memory",
207
204
  "test:performance": "node ./tests/performance/run.mjs",
208
- "test:performance:firefox": "node ./tests/performance/run.mjs --browser firefox",
209
205
  "test:unit": "vitest --config vitest.config.unit.mjs",
210
- "test:unit:watch": "vitest --config vitest.config.unit.mjs --watch",
206
+ "types": "tsc --noEmit --project .",
207
+ "types:all": "npm run types && npm run types:demo && npm run types:unit_tests",
208
+ "types:demo": "tsc --noEmit --project demo/",
209
+ "types:unit_tests": "tsc --noEmit --project ./tsconfig.unit-tests.json",
211
210
  "update-version": "bash ./scripts/update-version-number.sh"
212
211
  },
213
212
  "repository": {
@@ -249,25 +248,23 @@
249
248
  "start": "Build the demo with the non-minified RxPlayer and serve it on a local server. Re-build on file updates.\nUse `--help` option (`-- --help` when using `npm run`) to list options.",
250
249
  "demo": "Build the demo in demo/bundle.js.\nUse `--help` option (`-- --help` when using `npm run`) to list options.",
251
250
  "check:demo": "Check the validity of the demo directory by running the type checker and linter on it",
252
- "check:demo:types": "Check TypeScript types in demo files",
251
+ "types:demo": "Check TypeScript types in demo files",
253
252
  "lint:demo": "Run linter on demo files",
254
253
  "certificate": "Generate a certificate to be able to use HTTPS locally for the demo pages (`npm run start` will then listen to HTTPS requests through a communicated port)",
255
254
  "releases:demo": "Publish current demo as the GitHub's pages new demo page (\"stable\" branch only)"
256
255
  },
257
256
  "Type-check, format, or lint the current code": {
258
257
  "check": "Check the validity of the src directory by running the type checker and linter on it",
259
- "check:all": "Check the validity of the whole project by running linters and type checkers on all project directories",
258
+ "check:all": "Check the validity of the whole project by running linters and type checkers on all directories",
260
259
  "fmt:prettier": "Automatically format JavaScript, TypeScript, JSON, XML, HTML, YML and Markdown files",
261
260
  "fmt:prettier:check": "Check that JavaScript, TypeScript, JSON, XML, HTML, YML and Markdown files are well-formatted",
262
261
  "fmt:rust": "Automatically format Rust files",
263
262
  "fmt:rust:check": "Check that Rust files are well-formatted",
264
- "check:types": "Check TypeScript typings in src",
265
- "check:types:watch": "Check TypeScript typings in src each time files change",
266
- "lint": "Lint rx-player source files",
267
- "lint:all": "Lint all RxPlayer JS files, including scripts, demo, integration tests etc.",
268
- "lint:demo": "Lint demo source files",
269
- "lint:scripts": "Lint our JS scripts in the scripts/ directory",
270
- "lint:tests": "Lint integration tests source files"
263
+ "types": "Check TypeScript typings in src",
264
+ "types:all": "Check TypeScript typings in all RxPlayer files: src and demo",
265
+ "types -- -w": "Check TypeScript typings in src and restart at each time file update",
266
+ "lint": "Lint RxPlayer files in src",
267
+ "lint:all": "Lint all RxPlayer files, including scripts, demo, integration tests etc."
271
268
  },
272
269
  "Run tests": {
273
270
  "Integration tests (test the whole API, call the `build` script BEFORE running them)": {
@@ -294,8 +291,8 @@
294
291
  },
295
292
  "Build the player or one of its sub-parts": {
296
293
  "Regular builds (used by JS bundlers)": {
297
- "build": "Build the rx-player code in release mode. Use `--help` option (`-- --help` when using `npm run`) to list options.",
298
- "build -- --dev-mode": "Build the rx-player code in development mode (more runtime checks, non-minified worker)"
294
+ "build": "Build the RxPlayer code in release mode. Use `--help` option (`-- --help` when using `npm run`) to list options.",
295
+ "build -- --dev-mode": "Build the RxPlayer code in development mode (more runtime checks, non-minified worker)"
299
296
  },
300
297
  "Legacy bundle builds (single-file bundles exporting to window.RxPlayer)": {
301
298
  "bundle": "Build the player in dist/rx-player.js. Use `--help` option (`-- --help` when using `npm run`) to list options.",