@eluvio/elv-player-js 1.0.137 → 1.0.138

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eluvio/elv-player-js",
3
- "version": "1.0.137",
3
+ "version": "1.0.138",
4
4
  "description": "![Eluvio Logo](src/static/images/Logo.png \"Eluvio Logo\")",
5
5
  "main": "src/index.js",
6
6
  "license": "MIT",
package/src/index.js CHANGED
@@ -1174,17 +1174,22 @@ export class EluvioPlayer {
1174
1174
  });
1175
1175
 
1176
1176
  hlsPlayer.on(this.HLS.Events.ERROR, async (event, error) => {
1177
- this.errors += 1;
1178
-
1179
1177
  this.Log(`Encountered ${error.details}`, true);
1180
1178
  this.Log(error, true);
1181
1179
 
1180
+ if(error && [this.HLS.ErrorDetails.BUFFER_FULL_ERROR, this.HLS.ErrorDetails.BUFFER_STALLED_ERROR].includes(error.details)) {
1181
+ // Ignore HLS buffer errors
1182
+ return;
1183
+ }
1184
+
1185
+ this.errors += 1;
1186
+
1182
1187
  if(error.response && error.response.code === 403) {
1183
1188
  // Not allowed to access
1184
1189
  this.SetErrorMessage("Insufficient permissions");
1185
1190
  } else if(this.errors < 5) {
1186
1191
  if(error.fatal) {
1187
- if(data.type === this.HLS.ErrorTypes.MEDIA_ERROR) {
1192
+ if(error.type === this.HLS.ErrorTypes.MEDIA_ERROR) {
1188
1193
  this.Log("Attempting to recover using hlsPlayer.recoverMediaError");
1189
1194
  hlsPlayer.recoverMediaError();
1190
1195
  } else {