rx-player 4.2.0-dev.2024081301 → 4.2.0-dev.2024081400

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.
@@ -18,6 +18,7 @@ import { MediaError } from "../../errors";
18
18
  import log from "../../log";
19
19
  import type { IMediaSourceInterface } from "../../mse";
20
20
  import { SourceBufferType } from "../../mse";
21
+ import assert from "../../utils/assert";
21
22
  import createCancellablePromise from "../../utils/create_cancellable_promise";
22
23
  import isNullOrUndefined from "../../utils/is_null_or_undefined";
23
24
  import type { CancellationSignal } from "../../utils/task_canceller";
@@ -251,7 +252,8 @@ export default class SegmentSinksStore {
251
252
  }
252
253
  this._initializedSegmentSinks[bufferType] = null;
253
254
  if (SegmentSinksStore.isNative(bufferType)) {
254
- this._onNativeBufferAddedOrDisabled.forEach((cb) => cb());
255
+ this._onNativeBufferAddedOrDisabled.slice().forEach((cb) => cb());
256
+ assert(this._onNativeBufferAddedOrDisabled.length === 0);
255
257
  }
256
258
  }
257
259
 
@@ -295,7 +297,8 @@ export default class SegmentSinksStore {
295
297
  this._mediaSource,
296
298
  );
297
299
  this._initializedSegmentSinks[bufferType] = nativeSegmentSink;
298
- this._onNativeBufferAddedOrDisabled.forEach((cb) => cb());
300
+ this._onNativeBufferAddedOrDisabled.slice().forEach((cb) => cb());
301
+ assert(this._onNativeBufferAddedOrDisabled.length === 0);
299
302
  return nativeSegmentSink;
300
303
  }
301
304
 
@@ -409,7 +409,7 @@ class Player extends EventEmitter<IPublicAPIEvent> {
409
409
  // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1194624
410
410
  videoElement.preload = "auto";
411
411
 
412
- this.version = /* PLAYER_VERSION */ "4.2.0-dev.2024081301";
412
+ this.version = /* PLAYER_VERSION */ "4.2.0-dev.2024081400";
413
413
  this.log = log;
414
414
  this.state = "STOPPED";
415
415
  this.videoElement = videoElement;
@@ -3235,7 +3235,7 @@ class Player extends EventEmitter<IPublicAPIEvent> {
3235
3235
  }
3236
3236
  }
3237
3237
  }
3238
- Player.version = /* PLAYER_VERSION */ "4.2.0-dev.2024081301";
3238
+ Player.version = /* PLAYER_VERSION */ "4.2.0-dev.2024081400";
3239
3239
 
3240
3240
  /** Every events sent by the RxPlayer's public API. */
3241
3241
  interface IPublicAPIEvent {
@@ -35,7 +35,11 @@ function areCodecsCompatible(a: string, b: string): boolean {
35
35
  if (codecsA === "" || codecsB === "") {
36
36
  return false;
37
37
  }
38
- if (codecsA.split(".")[0] !== codecsB.split(".")[0]) {
38
+ let initialPartA = codecsA.split(".")[0];
39
+ initialPartA = initialPartA === "hev1" ? "hvc1" : initialPartA;
40
+ let initialPartB = codecsB.split(".")[0];
41
+ initialPartB = initialPartB === "hev1" ? "hvc1" : initialPartB;
42
+ if (initialPartA !== initialPartB) {
39
43
  return false;
40
44
  }
41
45
  return true;