bigscreen-player 8.1.1 → 8.2.0

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,5 +1,5 @@
1
1
  import { fromXML, generateISD, renderHTML } from 'smp-imsc';
2
- import { f as findSegmentTemplate, L as LoadUrl, a as DebugToolInstance, P as Plugins, U as Utils, D as DOMHelpers } from './main-e01b5eb1.js';
2
+ import { f as findSegmentTemplate, L as LoadUrl, a as DebugToolInstance, P as Plugins, U as Utils, D as DOMHelpers } from './main-3159416c.js';
3
3
 
4
4
  const SEGMENTS_BUFFER_SIZE = 3;
5
5
  const LOAD_ERROR_COUNT_MAX = 3;
@@ -71,7 +71,7 @@ function IMSCSubtitles(mediaPlayer, autoStart, parentElement, mediaSources, defa
71
71
  onLoad: (responseXML, responseText) => {
72
72
  resetLoadErrorCount();
73
73
  if (!responseXML && isSubtitlesWhole()) {
74
- DebugToolInstance.info("Error: responseXML is invalid.");
74
+ DebugToolInstance.error("responseXML is invalid");
75
75
  Plugins.interface.onSubtitlesXMLError({ cdn: mediaSources.currentSubtitlesCdn() });
76
76
  stop();
77
77
  return
@@ -92,17 +92,19 @@ function IMSCSubtitles(mediaPlayer, autoStart, parentElement, mediaSources, defa
92
92
  pruneSegments();
93
93
  }
94
94
  } catch (error) {
95
- DebugToolInstance.info(`Error transforming subtitles: ${error}`);
95
+ error.name = "SubtitlesTransformError";
96
+ DebugToolInstance.error(error);
97
+
96
98
  Plugins.interface.onSubtitlesTransformError();
97
99
  stop();
98
100
  }
99
101
  },
100
102
  onError: ({ statusCode, ...rest } = {}) => {
101
- DebugToolInstance.info(`Error loading subtitles data: ${statusCode}`);
103
+ DebugToolInstance.error(`Failed to load subtitle data. Status code: ${statusCode}`);
102
104
  loadErrorFailover({ statusCode, ...rest });
103
105
  },
104
106
  onTimeout: () => {
105
- DebugToolInstance.info("Request timeout loading subtitles");
107
+ DebugToolInstance.error("Loading subtitles timed out");
106
108
  Plugins.interface.onSubtitlesTimeout({ cdn: mediaSources.currentSubtitlesCdn() });
107
109
  stop();
108
110
  },
@@ -264,7 +266,9 @@ function IMSCSubtitles(mediaPlayer, autoStart, parentElement, mediaSources, defa
264
266
  const isd = generateISD(xml, currentTime);
265
267
  renderHTML(isd, subsElement, null, renderHeight, renderWidth, false, null, null, false, styleOpts);
266
268
  } catch (error) {
267
- DebugToolInstance.info(`Exception while rendering subtitles: ${error}`);
269
+ error.name = "SubtitlesRenderError";
270
+ DebugToolInstance.error(error);
271
+
268
272
  Plugins.interface.onSubtitlesRenderError();
269
273
  }
270
274
  }
@@ -1,4 +1,4 @@
1
- import { D as DOMHelpers, a as DebugToolInstance, P as Plugins, L as LoadUrl, T as TransportControlPosition } from './main-e01b5eb1.js';
1
+ import { D as DOMHelpers, a as DebugToolInstance, P as Plugins, L as LoadUrl, T as TransportControlPosition } from './main-3159416c.js';
2
2
 
3
3
  /**
4
4
  * Safely checks if an attribute exists on an element.