@eluvio/elv-player-js 2.1.31 → 2.1.32

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.
@@ -1,6 +1,6 @@
1
1
  {
2
- "_index-D1GyIY83.mjs": {
3
- "file": "index-D1GyIY83.mjs",
2
+ "_index-CDiIW_5e.mjs": {
3
+ "file": "index-CDiIW_5e.mjs",
4
4
  "name": "index",
5
5
  "dynamicImports": [
6
6
  "node_modules/@eluvio/crypto/src/index.js",
@@ -9,8 +9,8 @@
9
9
  "node_modules/dashjs/dist/modern/esm/dash.all.min.js"
10
10
  ]
11
11
  },
12
- "_index-DpD96cda.js": {
13
- "file": "index-DpD96cda.js",
12
+ "_index-DqDGdJnI.js": {
13
+ "file": "index-DqDGdJnI.js",
14
14
  "name": "index",
15
15
  "dynamicImports": [
16
16
  "node_modules/@eluvio/crypto/src/index.js",
@@ -25,7 +25,7 @@
25
25
  "src": "lib/index.js",
26
26
  "isEntry": true,
27
27
  "imports": [
28
- "_index-DpD96cda.js"
28
+ "_index-DqDGdJnI.js"
29
29
  ]
30
30
  },
31
31
  "lib/player/Analytics.js": {
@@ -35,12 +35,12 @@
35
35
  "isDynamicEntry": true
36
36
  },
37
37
  "node_modules/@eluvio/crypto/src/index.js": {
38
- "file": "index-BodaK1X1.js",
38
+ "file": "index-jX5s-TpZ.js",
39
39
  "name": "index",
40
40
  "src": "node_modules/@eluvio/crypto/src/index.js",
41
41
  "isDynamicEntry": true,
42
42
  "imports": [
43
- "_index-DpD96cda.js"
43
+ "_index-DqDGdJnI.js"
44
44
  ]
45
45
  },
46
46
  "node_modules/dashjs/dist/modern/esm/dash.all.min.js": {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DpD96cda.js");exports.EluvioPlayerParameters=e.PlayerParameters;exports.InitializeEluvioPlayer=e.Initialize;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DqDGdJnI.js");exports.EluvioPlayerParameters=e.PlayerParameters;exports.InitializeEluvioPlayer=e.Initialize;
@@ -1,4 +1,4 @@
1
- import { P as r, I as i } from "./index-D1GyIY83.mjs";
1
+ import { P as r, I as i } from "./index-CDiIW_5e.mjs";
2
2
  export {
3
3
  r as EluvioPlayerParameters,
4
4
  i as InitializeEluvioPlayer
@@ -210,6 +210,7 @@ const $t = {
210
210
  dashjsOptions: void 0,
211
211
  debugLogging: !1,
212
212
  maxBitrate: void 0,
213
+ minBitrate: void 0,
213
214
  // eslint-disable-next-line no-unused-vars
214
215
  playerCallback: ({ player: r, videoElement: e, hlsPlayer: t, dashPlayer: a }) => {
215
216
  },
@@ -50040,7 +50041,7 @@ function VP() {
50040
50041
  ElvCrypto: async () => {
50041
50042
  try {
50042
50043
  if (!a.elvCrypto) {
50043
- const s = (await import("./index-9vn4h4Fg.mjs")).default;
50044
+ const s = (await import("./index-DCKvHJpP.mjs")).default;
50044
50045
  a.elvCrypto = await new s().init();
50045
50046
  }
50046
50047
  return a.elvCrypto;
@@ -67362,6 +67363,9 @@ class Kw {
67362
67363
  if (this.playerOptions.maxBitrate && y.on(this.HLS.Events.MANIFEST_PARSED, (m, { levels: v, firstLevel: b }) => {
67363
67364
  let x = v.map((E, C) => E.bitrate > this.playerOptions.maxBitrate ? C : void 0).filter((E) => typeof E < "u").reverse();
67364
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
+ }), this.playerOptions.minBitrate && y.on(this.HLS.Events.MANIFEST_PARSED, (m, { levels: v, firstLevel: b }) => {
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));
67365
67369
  }), y.loadSource(e.toString()), y.attachMedia(this.video), this.controls && u.enabled) {
67366
67370
  const m = u.SwitchView;
67367
67371
  u.SwitchView = async (v) => {
@@ -67460,6 +67464,12 @@ class Kw {
67460
67464
  maxBitrate: { video: this.playerOptions.maxBitrate / 1e3 }
67461
67465
  }
67462
67466
  }
67467
+ }), this.playerOptions.minBitrate && u.updateSettings({
67468
+ streaming: {
67469
+ abr: {
67470
+ minBitrate: { video: this.playerOptions.minBitrate / 1e3 }
67471
+ }
67472
+ }
67463
67473
  }), e.searchParams.delete("authorization"), u.addRequestInterceptor(function(c) {
67464
67474
  return c.headers.Authorization = `Bearer ${t}`, c;
67465
67475
  }), a === $t.drms.WIDEVINE) {
@@ -1,4 +1,4 @@
1
- import { c as DI, r as tI, a as TA, b as rI, d as oA, e as uA, f as PA, g as cI } from "./index-D1GyIY83.mjs";
1
+ import { c as DI, r as tI, a as TA, b as rI, d as oA, e as uA, f as PA, g as cI } from "./index-CDiIW_5e.mjs";
2
2
  class BA {
3
3
  constructor(B) {
4
4
  this.wasm = B;