bigscreen-player 8.5.0 → 8.5.2
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-bc7164a3.js → imscsubtitles-f22ed876.js} +1 -1
- package/dist/esm/{legacysubtitles-46b9ab26.js → legacysubtitles-4e4f9a6c.js} +36 -11
- package/dist/esm/{main-e9ef0f50.js → main-28d9a42c.js} +4 -4
- package/dist/esm/main.js +1 -1
- package/dist/esm/{msestrategy-6447183c.js → msestrategy-7b87ddab.js} +1 -1
- package/package.json +1 -1
|
@@ -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-28d9a42c.js';
|
|
3
3
|
|
|
4
4
|
const SEGMENTS_BUFFER_SIZE = 3;
|
|
5
5
|
const LOAD_ERROR_COUNT_MAX = 3;
|
|
@@ -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-28d9a42c.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Safely checks if an attribute exists on an element.
|
|
@@ -360,20 +360,19 @@ function LegacySubtitles(mediaPlayer, autoStart, parentElement, mediaSources) {
|
|
|
360
360
|
if (url && url !== "") {
|
|
361
361
|
LoadUrl(url, {
|
|
362
362
|
timeout: mediaSources.subtitlesRequestTimeout(),
|
|
363
|
-
onLoad: (responseXML
|
|
364
|
-
if (
|
|
363
|
+
onLoad: (responseXML) => {
|
|
364
|
+
if (responseXML) {
|
|
365
|
+
createContainer(responseXML);
|
|
366
|
+
} else {
|
|
365
367
|
DebugToolInstance.info("Error: responseXML is invalid.");
|
|
366
368
|
Plugins.interface.onSubtitlesXMLError({ cdn: mediaSources.currentSubtitlesCdn() });
|
|
367
|
-
return
|
|
368
|
-
} else {
|
|
369
|
-
createContainer(responseXML);
|
|
370
369
|
}
|
|
371
370
|
},
|
|
372
371
|
onError: ({ statusCode, ...rest } = {}) => {
|
|
373
372
|
const errorCase = () => {
|
|
374
373
|
DebugToolInstance.info("Failed to load from subtitles file from all available CDNs");
|
|
375
374
|
};
|
|
376
|
-
DebugToolInstance.info(
|
|
375
|
+
DebugToolInstance.info(`Error loading subtitles data: ${statusCode}`);
|
|
377
376
|
mediaSources.failoverSubtitles(loadSubtitles, errorCase, { statusCode, ...rest });
|
|
378
377
|
},
|
|
379
378
|
onTimeout: () => {
|
|
@@ -388,6 +387,31 @@ function LegacySubtitles(mediaPlayer, autoStart, parentElement, mediaSources) {
|
|
|
388
387
|
container.id = "playerCaptionsContainer";
|
|
389
388
|
DOMHelpers.addClass(container, "playerCaptions");
|
|
390
389
|
|
|
390
|
+
const videoHeight = parentElement.clientHeight;
|
|
391
|
+
|
|
392
|
+
container.style.position = "absolute";
|
|
393
|
+
container.style.bottom = "0px";
|
|
394
|
+
container.style.right = "0px";
|
|
395
|
+
container.style.fontWeight = "bold";
|
|
396
|
+
container.style.textAlign = "center";
|
|
397
|
+
container.style.textShadow = "#161616 2px 2px 1px";
|
|
398
|
+
container.style.color = "#ebebeb";
|
|
399
|
+
|
|
400
|
+
if (videoHeight === 1080) {
|
|
401
|
+
container.style.width = "1824px";
|
|
402
|
+
container.style.fontSize = "63px";
|
|
403
|
+
container.style.paddingRight = "48px";
|
|
404
|
+
container.style.paddingLeft = "48px";
|
|
405
|
+
container.style.paddingBottom = "60px";
|
|
406
|
+
} else {
|
|
407
|
+
// Assume 720 if not 1080. Styling implementation could be cleaner, but this is a quick fix for legacy subtitles
|
|
408
|
+
container.style.width = "1216px";
|
|
409
|
+
container.style.fontSize = "42px";
|
|
410
|
+
container.style.paddingRight = "32px";
|
|
411
|
+
container.style.paddingLeft = "32px";
|
|
412
|
+
container.style.paddingBottom = "40px";
|
|
413
|
+
}
|
|
414
|
+
|
|
391
415
|
// TODO: We don't need this extra Div really... can we get rid of render() and use the passed in container?
|
|
392
416
|
subtitlesRenderer = Renderer("playerCaptions", xml, mediaPlayer);
|
|
393
417
|
container.appendChild(subtitlesRenderer.render());
|
|
@@ -418,6 +442,7 @@ function LegacySubtitles(mediaPlayer, autoStart, parentElement, mediaSources) {
|
|
|
418
442
|
};
|
|
419
443
|
|
|
420
444
|
for (const cssClassName in classes) {
|
|
445
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
421
446
|
if (classes.hasOwnProperty(cssClassName)) {
|
|
422
447
|
// Allow multiple flags to be set at once
|
|
423
448
|
if ((classes[cssClassName] & transportControlPosition) === classes[cssClassName]) {
|
|
@@ -435,13 +460,13 @@ function LegacySubtitles(mediaPlayer, autoStart, parentElement, mediaSources) {
|
|
|
435
460
|
}
|
|
436
461
|
|
|
437
462
|
return {
|
|
438
|
-
start
|
|
439
|
-
stop
|
|
440
|
-
updatePosition
|
|
463
|
+
start,
|
|
464
|
+
stop,
|
|
465
|
+
updatePosition,
|
|
441
466
|
customise: () => {},
|
|
442
467
|
renderExample: () => {},
|
|
443
468
|
clearExample: () => {},
|
|
444
|
-
tearDown
|
|
469
|
+
tearDown,
|
|
445
470
|
}
|
|
446
471
|
}
|
|
447
472
|
|
|
@@ -5960,7 +5960,7 @@ BasicStrategy.getLiveSupport = () => LiveSupport.SEEKABLE;
|
|
|
5960
5960
|
function StrategyPicker() {
|
|
5961
5961
|
return new Promise((resolve, reject) => {
|
|
5962
5962
|
if (window.bigscreenPlayer.playbackStrategy === PlaybackStrategy.MSE) {
|
|
5963
|
-
return import('./msestrategy-
|
|
5963
|
+
return import('./msestrategy-7b87ddab.js')
|
|
5964
5964
|
.then(({ default: MSEStrategy }) => resolve(MSEStrategy))
|
|
5965
5965
|
.catch(() => {
|
|
5966
5966
|
reject({ error: "strategyDynamicLoadError" });
|
|
@@ -6383,7 +6383,7 @@ const PauseTriggers = {
|
|
|
6383
6383
|
DEVICE: 3,
|
|
6384
6384
|
};
|
|
6385
6385
|
|
|
6386
|
-
var Version = "8.5.
|
|
6386
|
+
var Version = "8.5.2";
|
|
6387
6387
|
|
|
6388
6388
|
var sourceList;
|
|
6389
6389
|
var source;
|
|
@@ -7734,7 +7734,7 @@ function Subtitles(mediaPlayer, autoStart, playbackElement, defaultStyleOpts, me
|
|
|
7734
7734
|
|
|
7735
7735
|
if (available()) {
|
|
7736
7736
|
if (useLegacySubs) {
|
|
7737
|
-
import('./legacysubtitles-
|
|
7737
|
+
import('./legacysubtitles-4e4f9a6c.js')
|
|
7738
7738
|
.then(({ default: LegacySubtitles }) => {
|
|
7739
7739
|
subtitlesContainer = LegacySubtitles(mediaPlayer, autoStart, playbackElement, mediaSources, defaultStyleOpts);
|
|
7740
7740
|
callback(subtitlesEnabled);
|
|
@@ -7743,7 +7743,7 @@ function Subtitles(mediaPlayer, autoStart, playbackElement, defaultStyleOpts, me
|
|
|
7743
7743
|
Plugins.interface.onSubtitlesDynamicLoadError();
|
|
7744
7744
|
});
|
|
7745
7745
|
} else {
|
|
7746
|
-
import('./imscsubtitles-
|
|
7746
|
+
import('./imscsubtitles-f22ed876.js')
|
|
7747
7747
|
.then(({ default: IMSCSubtitles }) => {
|
|
7748
7748
|
subtitlesContainer = IMSCSubtitles(mediaPlayer, autoStart, playbackElement, mediaSources, defaultStyleOpts);
|
|
7749
7749
|
callback(subtitlesEnabled);
|
package/dist/esm/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { B as BigscreenPlayer, a as DebugTool, E as EntryCategory, c as LiveSupport, d as MediaKinds, M as MediaState, h as MockBigscreenPlayer, b as PauseTriggers, i as PlaybackStrategy, j as TransferFormat, T as TransportControlPosition, W as WindowTypes, k as isMessage, l as isMetric, m as isTrace } from './main-
|
|
1
|
+
export { B as BigscreenPlayer, a as DebugTool, E as EntryCategory, c as LiveSupport, d as MediaKinds, M as MediaState, h as MockBigscreenPlayer, b as PauseTriggers, i as PlaybackStrategy, j as TransferFormat, T as TransportControlPosition, W as WindowTypes, k as isMessage, l as isMetric, m as isTrace } from './main-28d9a42c.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MediaPlayer } from 'dashjs/index_mediaplayerOnly';
|
|
2
|
-
import { W as WindowTypes, U as Utils, D as DOMHelpers, b as PauseTriggers, c as LiveSupport, a as DebugToolInstance, M as MediaState, P as Plugins, d as MediaKinds, e as TimeUtils, g as DynamicWindowUtils } from './main-
|
|
2
|
+
import { W as WindowTypes, U as Utils, D as DOMHelpers, b as PauseTriggers, c as LiveSupport, a as DebugToolInstance, M as MediaState, P as Plugins, d as MediaKinds, e as TimeUtils, g as DynamicWindowUtils } from './main-28d9a42c.js';
|
|
3
3
|
|
|
4
4
|
function filter(manifest, representationOptions) {
|
|
5
5
|
const constantFps = representationOptions.constantFps;
|