@eluvio/elv-player-js 2.0.48 → 2.0.49

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,4 +1,4 @@
1
- import { c as cI, e as CI, r as vA, a as eI, b as fA, i as dA, s as xA, g as wI } from "./index-CzgSAUk0.mjs";
1
+ import { c as cI, e as CI, r as vA, a as eI, b as fA, i as dA, s as xA, g as wI } from "./index-DeV-6N-Y.mjs";
2
2
  class EA {
3
3
  constructor(I) {
4
4
  this.wasm = I;
@@ -49714,7 +49714,7 @@ const ii = {
49714
49714
  ElvCrypto: async () => {
49715
49715
  try {
49716
49716
  if (!ii.elvCrypto) {
49717
- const n = (await import("./index-CdPL6p_Q.mjs")).default;
49717
+ const n = (await import("./index-D2DLsakf.mjs")).default;
49718
49718
  ii.elvCrypto = await new n().init();
49719
49719
  }
49720
49720
  return ii.elvCrypto;
@@ -66128,11 +66128,22 @@ class o2 {
66128
66128
  }, m.on(this.HLS.Events.FRAG_LOADED, () => {
66129
66129
  this.errors = 0, clearTimeout(this.stallTimeout);
66130
66130
  }), m.on(this.HLS.Events.ERROR, async (w, b) => {
66131
- this.errors += 1, this.Log(`Encountered ${b.details}`, !0), this.Log(b, !0), b.response && b.response.code === 403 ? this.SetErrorMessage("Insufficient permissions", b) : this.errors < 5 ? b.fatal ? b.data && b.data.type === this.HLS.ErrorTypes.MEDIA_ERROR ? (this.Log("Attempting to recover using hlsPlayer.recoverMediaError", !0), m.recoverMediaError()) : this.__HardReload(b) : b.details === "bufferStalledError" && (clearTimeout(this.stallTimeout), this.stallTimeout = setTimeout(() => {
66132
- this.Log("Buffer Stalled. Attempting to recover using hlsPlayer.recoverMediaError", !0), m.recoverMediaError(), this.stallTimeout = setTimeout(() => {
66133
- this.Log("Buffer Stalled. Reloading player...", !0), this.__HardReload(b, 0);
66134
- }, 5e3);
66135
- }, 2e3)) : this.__HardReload(b);
66131
+ if (this.errors += 1, this.Log(`Encountered ${b.details}`, !0), this.Log(b, !0), b.response && b.response.code === 403)
66132
+ this.SetErrorMessage("Insufficient permissions", b);
66133
+ else if (this.errors < 5) {
66134
+ if (b.fatal)
66135
+ b.data && b.data.type === this.HLS.ErrorTypes.MEDIA_ERROR ? (this.Log("Attempting to recover using hlsPlayer.recoverMediaError", !0), m.recoverMediaError()) : this.__HardReload(b);
66136
+ else if (b.details === "bufferStalledError") {
66137
+ clearTimeout(this.stallTimeout);
66138
+ let g = this.video && this.video.currentTime;
66139
+ setTimeout(() => {
66140
+ this.video && this.video.currentTime > g || (this.Log("Buffer Stalled. Attempting to recover using hlsPlayer.recoverMediaError", !0), m.recoverMediaError(), this.stallTimeout = setTimeout(() => {
66141
+ this.Log("Buffer Stalled. Reloading player...", !0), this.__HardReload(b, 0);
66142
+ }, 5e3));
66143
+ }, 2e3);
66144
+ }
66145
+ } else
66146
+ this.__HardReload(b);
66136
66147
  }), this.hlsPlayer = m, this.player = m, l) {
66137
66148
  const w = document.createElement("source");
66138
66149
  w.src = this.playoutUrl.toString(), this.video.appendChild(w), this.video.disableRemotePlayback = !1;
@@ -66140,7 +66151,7 @@ class o2 {
66140
66151
  }
66141
66152
  }
66142
66153
  async __InitializeDash({ playoutUrl: e, authorizationToken: t, drm: r, drms: i }) {
66143
- this.Dash = (await import("./dash.all.min-QGl1wpEL.mjs").then((c) => c.d)).default;
66154
+ this.Dash = (await import("./dash.all.min-BeiZatYH.mjs").then((c) => c.d)).default;
66144
66155
  const o = this.Dash.MediaPlayer().create(), l = this.playerOptions.dashjsOptions || {};
66145
66156
  if (o.updateSettings({
66146
66157
  ...l,
@@ -801,7 +801,12 @@ export class EluvioPlayer {
801
801
  } else if(error.details === "bufferStalledError") {
802
802
  clearTimeout(this.stallTimeout);
803
803
 
804
- this.stallTimeout = setTimeout(() => {
804
+ let stalledTime = this.video && this.video.currentTime;
805
+ setTimeout(() => {
806
+ if(this.video && this.video.currentTime > stalledTime) {
807
+ return;
808
+ }
809
+
805
810
  this.Log("Buffer Stalled. Attempting to recover using hlsPlayer.recoverMediaError", true);
806
811
  hlsPlayer.recoverMediaError();
807
812
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eluvio/elv-player-js",
3
- "version": "2.0.48",
3
+ "version": "2.0.49",
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",