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.
- package/dist/esm/{imscsubtitles-be1b1b28.js → imscsubtitles-b57ed60e.js} +7 -7
- package/dist/esm/{legacysubtitles-d83d41ee.js → legacysubtitles-b3f55608.js} +7 -7
- package/dist/esm/{main-d1def369.js → main-52f61531.js} +380 -339
- package/dist/esm/main.js +1 -1
- package/dist/esm/{msestrategy-5313322e.js → msestrategy-f953decf.js} +93 -70
- package/package.json +3 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { fromXML, generateISD, renderHTML } from 'smp-imsc';
|
|
2
|
-
import { f as findSegmentTemplate, L as LoadUrl, a as
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
101
|
+
DebugToolInstance.info(`Error loading subtitles data: ${statusCode}`);
|
|
102
102
|
loadErrorFailover({ statusCode, ...rest });
|
|
103
103
|
},
|
|
104
104
|
onTimeout: () => {
|
|
105
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
374
|
+
DebugToolInstance.info("Failed to load from subtitles file from all available CDNs");
|
|
375
375
|
};
|
|
376
|
-
|
|
376
|
+
DebugToolInstance.info("Error loading subtitles data: " + statusCode);
|
|
377
377
|
mediaSources.failoverSubtitles(loadSubtitles, errorCase, { statusCode, ...rest });
|
|
378
378
|
},
|
|
379
379
|
onTimeout: () => {
|
|
380
|
-
|
|
380
|
+
DebugToolInstance.info("Request timeout loading subtitles");
|
|
381
381
|
Plugins.interface.onSubtitlesTimeout({ cdn: mediaSources.currentSubtitlesCdn() });
|
|
382
382
|
},
|
|
383
383
|
});
|