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.
- package/dist/esm/{imscsubtitles-858ac78a.js → imscsubtitles-119375e3.js} +10 -6
- package/dist/esm/{legacysubtitles-1ce68fc3.js → legacysubtitles-6de060f9.js} +1 -1
- package/dist/esm/{main-e01b5eb1.js → main-3159416c.js} +844 -748
- package/dist/esm/main.d.ts +587 -0
- package/dist/esm/main.js +1 -1
- package/dist/esm/{msestrategy-87cffc69.js → msestrategy-01ed7ba0.js} +124 -24
- package/package.json +39 -27
|
@@ -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-
|
|
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.
|
|
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
|
-
|
|
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.
|
|
103
|
+
DebugToolInstance.error(`Failed to load subtitle data. Status code: ${statusCode}`);
|
|
102
104
|
loadErrorFailover({ statusCode, ...rest });
|
|
103
105
|
},
|
|
104
106
|
onTimeout: () => {
|
|
105
|
-
DebugToolInstance.
|
|
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
|
-
|
|
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-
|
|
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.
|