bigscreen-player 6.1.0 → 7.1.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 DebugTool, P as Plugins, U as Utils, D as DOMHelpers } from './main-d1def369.js';
2
+ import { f as findSegmentTemplate, L as LoadUrl, a as DebugToolInstance, P as Plugins, U as Utils, D as DOMHelpers } from './main-52f61531.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
- DebugTool.info("Error: responseXML is invalid.");
74
+ DebugToolInstance.info("Error: responseXML is invalid.");
75
75
  Plugins.interface.onSubtitlesXMLError({ cdn: mediaSources.currentSubtitlesCdn() });
76
76
  stop();
77
77
  return
@@ -92,17 +92,17 @@ function IMSCSubtitles(mediaPlayer, autoStart, parentElement, mediaSources, defa
92
92
  pruneSegments();
93
93
  }
94
94
  } catch (error) {
95
- DebugTool.info(`Error transforming subtitles: ${error}`);
95
+ DebugToolInstance.info(`Error transforming subtitles: ${error}`);
96
96
  Plugins.interface.onSubtitlesTransformError();
97
97
  stop();
98
98
  }
99
99
  },
100
100
  onError: ({ statusCode, ...rest } = {}) => {
101
- DebugTool.info(`Error loading subtitles data: ${statusCode}`);
101
+ DebugToolInstance.info(`Error loading subtitles data: ${statusCode}`);
102
102
  loadErrorFailover({ statusCode, ...rest });
103
103
  },
104
104
  onTimeout: () => {
105
- DebugTool.info("Request timeout loading subtitles");
105
+ DebugToolInstance.info("Request timeout loading subtitles");
106
106
  Plugins.interface.onSubtitlesTimeout({ cdn: mediaSources.currentSubtitlesCdn() });
107
107
  stop();
108
108
  },
@@ -123,7 +123,7 @@ function IMSCSubtitles(mediaPlayer, autoStart, parentElement, mediaSources, defa
123
123
 
124
124
  function loadErrorFailover(opts) {
125
125
  const errorCase = () => {
126
- DebugTool.info("No more CDNs available for subtitle failover");
126
+ DebugToolInstance.info("No more CDNs available for subtitle failover");
127
127
  };
128
128
 
129
129
  const isWhole = isSubtitlesWhole();
@@ -264,7 +264,7 @@ function IMSCSubtitles(mediaPlayer, autoStart, parentElement, mediaSources, defa
264
264
  const isd = generateISD(xml, currentTime);
265
265
  renderHTML(isd, subsElement, null, renderHeight, renderWidth, false, null, null, false, styleOpts);
266
266
  } catch (error) {
267
- DebugTool.info(`Exception while rendering subtitles: ${error}`);
267
+ DebugToolInstance.info(`Exception while rendering subtitles: ${error}`);
268
268
  Plugins.interface.onSubtitlesRenderError();
269
269
  }
270
270
  }
@@ -1,4 +1,4 @@
1
- import { D as DOMHelpers, a as DebugTool, P as Plugins, L as LoadUrl, T as TransportControlPosition } from './main-d1def369.js';
1
+ import { D as DOMHelpers, a as DebugToolInstance, P as Plugins, L as LoadUrl, T as TransportControlPosition } from './main-52f61531.js';
2
2
 
3
3
  /**
4
4
  * Safely checks if an attribute exists on an element.
@@ -246,7 +246,7 @@ function Transformer() {
246
246
  subtitlesForTime: (time) => items.filter((subtitle) => subtitle.start < time && subtitle.end > time),
247
247
  }
248
248
  } catch (e) {
249
- DebugTool.info("Error transforming captions : " + e);
249
+ DebugToolInstance.info("Error transforming captions : " + e);
250
250
  Plugins.interface.onSubtitlesTransformError();
251
251
  }
252
252
  }
@@ -304,7 +304,7 @@ function Renderer(id, captionsXML, mediaPlayer) {
304
304
 
305
305
  confirmCaptionsRendered();
306
306
  } catch (e) {
307
- DebugTool.info("Exception while rendering subtitles: " + e);
307
+ DebugToolInstance.info("Exception while rendering subtitles: " + e);
308
308
  Plugins.interface.onSubtitlesRenderError();
309
309
  }
310
310
  }
@@ -362,7 +362,7 @@ function LegacySubtitles(mediaPlayer, autoStart, parentElement, mediaSources) {
362
362
  timeout: mediaSources.subtitlesRequestTimeout(),
363
363
  onLoad: (responseXML, responseText, status) => {
364
364
  if (!responseXML) {
365
- DebugTool.info("Error: responseXML is invalid.");
365
+ DebugToolInstance.info("Error: responseXML is invalid.");
366
366
  Plugins.interface.onSubtitlesXMLError({ cdn: mediaSources.currentSubtitlesCdn() });
367
367
  return
368
368
  } else {
@@ -371,13 +371,13 @@ function LegacySubtitles(mediaPlayer, autoStart, parentElement, mediaSources) {
371
371
  },
372
372
  onError: ({ statusCode, ...rest } = {}) => {
373
373
  const errorCase = () => {
374
- DebugTool.info("Failed to load from subtitles file from all available CDNs");
374
+ DebugToolInstance.info("Failed to load from subtitles file from all available CDNs");
375
375
  };
376
- DebugTool.info("Error loading subtitles data: " + statusCode);
376
+ DebugToolInstance.info("Error loading subtitles data: " + statusCode);
377
377
  mediaSources.failoverSubtitles(loadSubtitles, errorCase, { statusCode, ...rest });
378
378
  },
379
379
  onTimeout: () => {
380
- DebugTool.info("Request timeout loading subtitles");
380
+ DebugToolInstance.info("Request timeout loading subtitles");
381
381
  Plugins.interface.onSubtitlesTimeout({ cdn: mediaSources.currentSubtitlesCdn() });
382
382
  },
383
383
  });