rx-player 4.5.0-dev.2026060401 → 4.5.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 (35) hide show
  1. package/CHANGELOG.md +15 -14
  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/fetchers/utils/schedule_request.d.ts.map +1 -1
  8. package/dist/commonjs/core/fetchers/utils/schedule_request.js +5 -2
  9. package/dist/commonjs/main_thread/api/public_api.js +2 -2
  10. package/dist/commonjs/main_thread/core_interface/monothread.d.ts.map +1 -1
  11. package/dist/commonjs/main_thread/core_interface/monothread.js +3 -2
  12. package/dist/commonjs/main_thread/render_thumbnail.d.ts.map +1 -1
  13. package/dist/commonjs/main_thread/render_thumbnail.js +7 -4
  14. package/dist/es2017/__GENERATED_CODE/embedded_dash_wasm.d.ts.map +1 -1
  15. package/dist/es2017/__GENERATED_CODE/embedded_dash_wasm.js +1 -1
  16. package/dist/es2017/__GENERATED_CODE/embedded_worker.d.ts.map +1 -1
  17. package/dist/es2017/__GENERATED_CODE/embedded_worker.js +1 -1
  18. package/dist/es2017/core/fetchers/utils/schedule_request.d.ts.map +1 -1
  19. package/dist/es2017/core/fetchers/utils/schedule_request.js +5 -2
  20. package/dist/es2017/main_thread/api/public_api.js +2 -2
  21. package/dist/es2017/main_thread/core_interface/monothread.d.ts.map +1 -1
  22. package/dist/es2017/main_thread/core_interface/monothread.js +3 -2
  23. package/dist/es2017/main_thread/render_thumbnail.d.ts.map +1 -1
  24. package/dist/es2017/main_thread/render_thumbnail.js +7 -4
  25. package/dist/mpd-parser.wasm +0 -0
  26. package/dist/worker.js +1 -1
  27. package/package.json +2 -2
  28. package/src/__GENERATED_CODE/embedded_dash_wasm.ts +1 -1
  29. package/src/__GENERATED_CODE/embedded_worker.ts +1 -1
  30. package/src/core/fetchers/utils/schedule_request.ts +4 -2
  31. package/src/main_thread/__tests__/render_thumbnail.test.ts +193 -0
  32. package/src/main_thread/api/public_api.ts +2 -2
  33. package/src/main_thread/core_interface/monothread.ts +3 -2
  34. package/src/main_thread/render_thumbnail.ts +7 -4
  35. package/src/parsers/manifest/dash/wasm-parser/rs/lib.rs +1 -0
@@ -1 +1 @@
1
- {"version":3,"file":"schedule_request.d.ts","sourceRoot":"","sources":["../../../../../src/core/fetchers/utils/schedule_request.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAK9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAExE,OAAO,KAAK,cAAc,MAAM,oBAAoB,CAAC;AAiDrD,6EAA6E;AAC7E,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,iDAAiD;IACjD,OAAO,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,wBAAsB,uBAAuB,CAAC,CAAC,EAC7C,IAAI,EAAE,YAAY,EAAE,GAAG,IAAI,EAC3B,cAAc,EAAE,cAAc,GAAG,IAAI,EACrC,cAAc,EAAE,CACd,GAAG,EAAE,YAAY,GAAG,IAAI,EACxB,kBAAkB,EAAE,kBAAkB,KACnC,OAAO,CAAC,CAAC,CAAC,EACf,OAAO,EAAE,gBAAgB,EACzB,kBAAkB,EAAE,kBAAkB,GACrC,OAAO,CAAC,CAAC,CAAC,CAkPZ;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EACtC,cAAc,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAChC,OAAO,EAAE,gBAAgB,EACzB,kBAAkB,EAAE,kBAAkB,GACrC,OAAO,CAAC,CAAC,CAAC,CAGZ"}
1
+ {"version":3,"file":"schedule_request.d.ts","sourceRoot":"","sources":["../../../../../src/core/fetchers/utils/schedule_request.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAK9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAExE,OAAO,KAAK,cAAc,MAAM,oBAAoB,CAAC;AAmDrD,6EAA6E;AAC7E,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,iDAAiD;IACjD,OAAO,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,wBAAsB,uBAAuB,CAAC,CAAC,EAC7C,IAAI,EAAE,YAAY,EAAE,GAAG,IAAI,EAC3B,cAAc,EAAE,cAAc,GAAG,IAAI,EACrC,cAAc,EAAE,CACd,GAAG,EAAE,YAAY,GAAG,IAAI,EACxB,kBAAkB,EAAE,kBAAkB,KACnC,OAAO,CAAC,CAAC,CAAC,EACf,OAAO,EAAE,gBAAgB,EACzB,kBAAkB,EAAE,kBAAkB,GACrC,OAAO,CAAC,CAAC,CAAC,CAkPZ;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EACtC,cAAc,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAChC,OAAO,EAAE,gBAAgB,EACzB,kBAAkB,EAAE,kBAAkB,GACrC,OAAO,CAAC,CAAC,CAAC,CAGZ"}
@@ -40,7 +40,9 @@ function shouldRetry(error) {
40
40
  error.status === 415 || // some CDN seems to use that code when
41
41
  // requesting low-latency segments too much
42
42
  // in advance
43
- error.status === 412);
43
+ error.status === 412 ||
44
+ error.status === 429 // TODO: Handle optional Retry-After header
45
+ );
44
46
  }
45
47
  return (error.type === NetworkErrorTypes.TIMEOUT ||
46
48
  error.type === NetworkErrorTypes.ERROR_EVENT);
@@ -55,7 +57,8 @@ function shouldRetry(error) {
55
57
  error.xhr.status === 415 || // some CDN seems to use that code when
56
58
  // requesting low-latency segments too much
57
59
  // in advance
58
- error.xhr.status === 412);
60
+ error.xhr.status === 412 ||
61
+ error.xhr.status === 429);
59
62
  }
60
63
  return false;
61
64
  }
@@ -164,7 +164,7 @@ class Player extends EventEmitter {
164
164
  // Workaround to support Firefox autoplay on FF 42.
165
165
  // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1194624
166
166
  videoElement.preload = "auto";
167
- this.version = /* PLAYER_VERSION */ "4.5.0-dev.2026060401";
167
+ this.version = /* PLAYER_VERSION */ "4.5.0";
168
168
  this.log = log;
169
169
  this.state = "STOPPED";
170
170
  this.videoElement = videoElement;
@@ -2886,5 +2886,5 @@ class Player extends EventEmitter {
2886
2886
  * Use of a WeakSet ensure the object is garbage collected if it's not used anymore.
2887
2887
  */
2888
2888
  Player._priv_currentlyUsedVideoElements = new WeakSet();
2889
- Player.version = /* PLAYER_VERSION */ "4.5.0-dev.2026060401";
2889
+ Player.version = /* PLAYER_VERSION */ "4.5.0";
2890
2890
  export default Player;
@@ -1 +1 @@
1
- {"version":3,"file":"monothread.d.ts","sourceRoot":"","sources":["../../../../src/main_thread/core_interface/monothread.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC9B,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,aAAa,MAAM,QAAQ,CAAC;AAEnC,qBAAa,uBAAwB,SAAQ,aAAa;IACxD,OAAO,CAAC,oBAAoB,CAA2B;;IAOhD,WAAW,CAAC,GAAG,EAAE,kBAAkB;IAQnC,YAAY,IAAI;QACrB,sBAAsB,EAAE,CAAC,OAAO,EAAE,wBAAwB,KAAK,IAAI,CAAC;QACpE,eAAe,EAAE,CAAC,GAAG,EAAE,YAAY,EAAE,aAAa,CAAC,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;KAC9E;CAgBF"}
1
+ {"version":3,"file":"monothread.d.ts","sourceRoot":"","sources":["../../../../src/main_thread/core_interface/monothread.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC9B,MAAM,kBAAkB,CAAC;AAI1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,aAAa,MAAM,QAAQ,CAAC;AAEnC,qBAAa,uBAAwB,SAAQ,aAAa;IACxD,OAAO,CAAC,oBAAoB,CAA2B;;IAOhD,WAAW,CAAC,GAAG,EAAE,kBAAkB;IAQnC,YAAY,IAAI;QACrB,sBAAsB,EAAE,CAAC,OAAO,EAAE,wBAAwB,KAAK,IAAI,CAAC;QACpE,eAAe,EAAE,CAAC,GAAG,EAAE,YAAY,EAAE,aAAa,CAAC,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;KAC9E;CAgBF"}
@@ -1,5 +1,6 @@
1
1
  import log from "../../log";
2
2
  import noop from "../../utils/noop";
3
+ import queueMicrotaskUtil from "../../utils/queue_microtask";
3
4
  import CoreInterface from "./base";
4
5
  export class MonoThreadCoreInterface extends CoreInterface {
5
6
  constructor() {
@@ -8,7 +9,7 @@ export class MonoThreadCoreInterface extends CoreInterface {
8
9
  }
9
10
  sendMessage(msg) {
10
11
  log.debug("M-->C", "Sending message", { name: msg.type });
11
- queueMicrotask(() => {
12
+ queueMicrotaskUtil(() => {
12
13
  // NOTE: We don't clone for performance reasons
13
14
  this._currentCoreListener({ data: msg });
14
15
  });
@@ -18,7 +19,7 @@ export class MonoThreadCoreInterface extends CoreInterface {
18
19
  this._currentCoreListener = handler;
19
20
  };
20
21
  const sendCoreMessage = (msg, _transferables) => {
21
- queueMicrotask(() => {
22
+ queueMicrotaskUtil(() => {
22
23
  if (msg.type !== "log" /* CoreMessageType.LogMessage */) {
23
24
  log.debug("M<--C", "Sending message", { name: msg.type });
24
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"render_thumbnail.d.ts","sourceRoot":"","sources":["../../../src/main_thread/render_thumbnail.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAKlE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAA8B,eAAe,CAC3C,YAAY,EAAE,sBAAsB,GAAG,IAAI,EAC3C,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,IAAI,CAAC,CAmNf"}
1
+ {"version":3,"file":"render_thumbnail.d.ts","sourceRoot":"","sources":["../../../src/main_thread/render_thumbnail.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAKlE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAA8B,eAAe,CAC3C,YAAY,EAAE,sBAAsB,GAAG,IAAI,EAC3C,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,IAAI,CAAC,CAsNf"}
@@ -44,7 +44,9 @@ export default async function renderThumbnail(contentInfos, options) {
44
44
  const onFinished = () => {
45
45
  unlinkCanceller();
46
46
  canceller.cancel("thumbnail request finished");
47
- thumbnailRequestsInfo.pendingRequests.delete(container);
47
+ if (thumbnailRequestsInfo.pendingRequests.get(container) === canceller) {
48
+ thumbnailRequestsInfo.pendingRequests.delete(container);
49
+ }
48
50
  // Let's revoke the URL after a round-trip to the event loop just in case
49
51
  // to prevent revoking before the browser use it.
50
52
  // This is normally not necessary, but better safe than sorry.
@@ -148,13 +150,14 @@ export default async function renderThumbnail(contentInfos, options) {
148
150
  });
149
151
  }
150
152
  catch (srcError) {
151
- if (options.keepPreviousThumbnailOnError !== true) {
152
- clearPreviousThumbnails();
153
- }
154
153
  if (srcError !== null && srcError === canceller.signal.cancellationError) {
154
+ onFinished();
155
155
  const error = new ThumbnailRenderingError("ABORTED", "Thumbnail rendering has been aborted");
156
156
  throw error;
157
157
  }
158
+ if (options.keepPreviousThumbnailOnError !== true) {
159
+ clearPreviousThumbnails();
160
+ }
158
161
  if (srcError instanceof ThumbnailRenderingError) {
159
162
  onFinished();
160
163
  throw srcError;
Binary file