@eluvio/elv-player-js 2.1.32 → 2.1.33

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.
@@ -50041,7 +50041,7 @@ function VP() {
50041
50041
  ElvCrypto: async () => {
50042
50042
  try {
50043
50043
  if (!a.elvCrypto) {
50044
- const s = (await import("./index-DCKvHJpP.mjs")).default;
50044
+ const s = (await import("./index-BAMTZqd_.mjs")).default;
50045
50045
  a.elvCrypto = await new s().init();
50046
50046
  }
50047
50047
  return a.elvCrypto;
@@ -67365,7 +67365,7 @@ class Kw {
67365
67365
  x.length === v.length && (this.Log(`Warning: Max bitrate '${this.playerOptions.maxBitrate}bps' is less than all available levels for this content.`), x = x.filter((E) => E > 0)), this.Log("Removing the following levels due to maxBitrate setting:"), this.Log(x.map((E) => [v[E].width, "x", v[E].height, ` (${(v[E].bitrate / 1e3 / 1e3).toFixed(1)}Mbps)`].join("")).join(", ")), x.find((E) => b === E) && (y.startLevel = v.map((E, C) => C).filter((E) => !x.includes(E)).reverse()[0]), x.map((E) => y.removeLevel(E));
67366
67366
  }), this.playerOptions.minBitrate && y.on(this.HLS.Events.MANIFEST_PARSED, (m, { levels: v, firstLevel: b }) => {
67367
67367
  let x = v.map((E, C) => E.bitrate < this.playerOptions.minBitrate ? C : void 0).filter((E) => typeof E < "u");
67368
- x.length === v.length && (this.Log(`Warning: Min bitrate '${this.playerOptions.minBitrate}bps' is greater than all available levels for this content.`), x = x.filter((E) => E < v.length - 1)), this.Log("Removing the following levels due to minBitrate setting:"), this.Log(x.map((E) => [v[E].width, "x", v[E].height, ` (${(v[E].bitrate / 1e3 / 1e3).toFixed(1)}Mbps)`].join("")).join(", ")), x.find((E) => b === E) && (y.startLevel = v.map((E, C) => C).filter((E) => !x.includes(E)).reverse()[0]), x.map((E) => y.removeLevel(E));
67368
+ x.length === v.length && (this.Log(`Warning: Min bitrate '${this.playerOptions.minBitrate}bps' is greater than all available levels for this content.`), x = x.slice(0, -1)), this.Log("Removing the following levels due to minBitrate setting:"), this.Log(x.map((E) => [v[E].width, "x", v[E].height, ` (${(v[E].bitrate / 1e3 / 1e3).toFixed(1)}Mbps)`].join("")).join(", ")), x.find((E) => b === E) && (y.startLevel = v.map((E, C) => C).filter((E) => !x.includes(E)).reverse()[0]), x.reverse().map((E) => y.removeLevel(E));
67369
67369
  }), y.loadSource(e.toString()), y.attachMedia(this.video), this.controls && u.enabled) {
67370
67370
  const m = u.SwitchView;
67371
67371
  u.SwitchView = async (v) => {
@@ -838,7 +838,7 @@ export class EluvioPlayer {
838
838
  if(levelsToRemove.length === levels.length) {
839
839
  this.Log(`Warning: Min bitrate '${this.playerOptions.minBitrate}bps' is greater than all available levels for this content.`);
840
840
  // Keep first level
841
- levelsToRemove = levelsToRemove.filter(i => i < levels.length - 1);
841
+ levelsToRemove = levelsToRemove.slice(0, -1);
842
842
  }
843
843
 
844
844
  this.Log("Removing the following levels due to minBitrate setting:");
@@ -849,7 +849,7 @@ export class EluvioPlayer {
849
849
  hlsPlayer.startLevel = levels.map((_, i) => i).filter(i => !levelsToRemove.includes(i)).reverse()[0];
850
850
  }
851
851
 
852
- levelsToRemove.map(i => hlsPlayer.removeLevel(i));
852
+ levelsToRemove.reverse().map(i => hlsPlayer.removeLevel(i));
853
853
  });
854
854
  }
855
855
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eluvio/elv-player-js",
3
- "version": "2.1.32",
3
+ "version": "2.1.33",
4
4
  "description": "![Eluvio Logo](lib/static/images/Logo.png \"Eluvio Logo\")",
5
5
  "main": "dist/elv-player-js.es.js",
6
6
  "license": "MIT",