bigscreen-player 10.15.0 → 10.15.4
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/{embeddedsubtitles-2a0bb52a.js → embeddedsubtitles-c88aae3d.js} +1 -1
- package/dist/esm/{imscsubtitles-62fba8c8.js → imscsubtitles-e9d2f7cd.js} +13 -1
- package/dist/esm/{legacysubtitles-56482e46.js → legacysubtitles-cdba2398.js} +1 -1
- package/dist/esm/{main-ec3a6ebb.js → main-81bb70d8.js} +5 -5
- package/dist/esm/main.js +1 -1
- package/dist/esm/{msestrategy-5402c814.js → msestrategy-9c868a9e.js} +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { fromXML, generateISD, renderHTML } from 'smp-imsc';
|
|
2
|
-
import { U as Utils, a as DebugTool, P as Plugins, D as DOMHelpers } from './main-
|
|
2
|
+
import { U as Utils, a as DebugTool, P as Plugins, D as DOMHelpers } from './main-81bb70d8.js';
|
|
3
3
|
import 'tslib';
|
|
4
4
|
|
|
5
5
|
function EmbeddedSubtitles(mediaPlayer, parentElement, { autoStart = false, defaultStyleOpts = {} } = {}) {
|
|
@@ -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-
|
|
2
|
+
import { f as findSegmentTemplate, L as LoadUrl, a as DebugTool, P as Plugins, U as Utils, D as DOMHelpers } from './main-81bb70d8.js';
|
|
3
3
|
import 'tslib';
|
|
4
4
|
|
|
5
5
|
const SEGMENTS_BUFFER_SIZE = 3;
|
|
@@ -20,6 +20,8 @@ function IMSCSubtitles(
|
|
|
20
20
|
let currentSubtitlesElement;
|
|
21
21
|
let updateInterval;
|
|
22
22
|
|
|
23
|
+
let previousTime = null;
|
|
24
|
+
|
|
23
25
|
if (autoStart) start();
|
|
24
26
|
|
|
25
27
|
function hasOffset() {
|
|
@@ -295,6 +297,7 @@ function IMSCSubtitles(
|
|
|
295
297
|
function renderSubtitle(xml, currentTime, subsElement, styleOpts, renderHeight, renderWidth) {
|
|
296
298
|
try {
|
|
297
299
|
const isd = generateISD(xml, currentTime);
|
|
300
|
+
|
|
298
301
|
renderHTML(isd, subsElement, null, renderHeight, renderWidth, false, null, null, false, styleOpts);
|
|
299
302
|
} catch (error) {
|
|
300
303
|
error.name = "SubtitlesRenderError";
|
|
@@ -364,6 +367,15 @@ function IMSCSubtitles(
|
|
|
364
367
|
}
|
|
365
368
|
|
|
366
369
|
function update(currentTime) {
|
|
370
|
+
// clears state to ensure we always check if subtitles should be rendered after a seek
|
|
371
|
+
if (typeof previousTime === "number" && (previousTime > currentTime || currentTime - previousTime > 2)) {
|
|
372
|
+
for (const segment of segments) {
|
|
373
|
+
segment.previousSubtitleIndex = undefined;
|
|
374
|
+
}
|
|
375
|
+
removeCurrentSubtitlesElement();
|
|
376
|
+
}
|
|
377
|
+
previousTime = currentTime;
|
|
378
|
+
|
|
367
379
|
const segment = getSegmentToRender(currentTime);
|
|
368
380
|
|
|
369
381
|
if (segment) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DOMHelpers, a as DebugTool, P as Plugins, L as LoadUrl, T as TransportControlPosition } from './main-
|
|
1
|
+
import { D as DOMHelpers, a as DebugTool, P as Plugins, L as LoadUrl, T as TransportControlPosition } from './main-81bb70d8.js';
|
|
2
2
|
import 'tslib';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -5710,7 +5710,7 @@ BasicStrategy.getLiveSupport = () => LiveSupport.SEEKABLE;
|
|
|
5710
5710
|
function StrategyPicker() {
|
|
5711
5711
|
return new Promise((resolve, reject) => {
|
|
5712
5712
|
if (window.bigscreenPlayer.playbackStrategy === PlaybackStrategy.MSE) {
|
|
5713
|
-
return import('./msestrategy-
|
|
5713
|
+
return import('./msestrategy-9c868a9e.js')
|
|
5714
5714
|
.then(({ default: MSEStrategy }) => resolve(MSEStrategy))
|
|
5715
5715
|
.catch((reason) => {
|
|
5716
5716
|
const error = new Error(isError(reason) ? reason.message : undefined);
|
|
@@ -6509,7 +6509,7 @@ const PauseTriggers = {
|
|
|
6509
6509
|
DEVICE: 3,
|
|
6510
6510
|
};
|
|
6511
6511
|
|
|
6512
|
-
var Version = "10.15.
|
|
6512
|
+
var Version = "10.15.4";
|
|
6513
6513
|
|
|
6514
6514
|
/* eslint-disable no-use-before-define */
|
|
6515
6515
|
|
|
@@ -7701,7 +7701,7 @@ function Subtitles(
|
|
|
7701
7701
|
|
|
7702
7702
|
if (available()) {
|
|
7703
7703
|
if (useLegacySubs) {
|
|
7704
|
-
import('./legacysubtitles-
|
|
7704
|
+
import('./legacysubtitles-cdba2398.js')
|
|
7705
7705
|
.then(({ default: LegacySubtitles }) => {
|
|
7706
7706
|
subtitlesContainer = LegacySubtitles(mediaPlayer, playbackElement, mediaSources, {
|
|
7707
7707
|
alwaysOnTop,
|
|
@@ -7715,7 +7715,7 @@ function Subtitles(
|
|
|
7715
7715
|
Plugins.interface.onSubtitlesDynamicLoadError();
|
|
7716
7716
|
});
|
|
7717
7717
|
} else if (embeddedSubs) {
|
|
7718
|
-
import('./embeddedsubtitles-
|
|
7718
|
+
import('./embeddedsubtitles-c88aae3d.js')
|
|
7719
7719
|
.then(({ default: EmbeddedSubtitles }) => {
|
|
7720
7720
|
subtitlesContainer = EmbeddedSubtitles(mediaPlayer, playbackElement, {
|
|
7721
7721
|
autoStart,
|
|
@@ -7728,7 +7728,7 @@ function Subtitles(
|
|
|
7728
7728
|
Plugins.interface.onSubtitlesDynamicLoadError();
|
|
7729
7729
|
});
|
|
7730
7730
|
} else {
|
|
7731
|
-
import('./imscsubtitles-
|
|
7731
|
+
import('./imscsubtitles-e9d2f7cd.js')
|
|
7732
7732
|
.then(({ default: IMSCSubtitles }) => {
|
|
7733
7733
|
subtitlesContainer = IMSCSubtitles(mediaPlayer, playbackElement, mediaSources, {
|
|
7734
7734
|
alwaysOnTop,
|
package/dist/esm/main.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { B as BigscreenPlayer, a as DebugTool, E as EntryCategory, b as LiveSupport, c as ManifestType, M as MediaKinds, d as MediaState, g as MockBigscreenPlayer, h as PauseTriggers, i as PlaybackStrategy, k as Timeline, j as TransferFormat, T as TransportControlPosition, W as WindowTypes, l as isMessage, m as isMetric, n as isTrace } from './main-
|
|
1
|
+
export { B as BigscreenPlayer, a as DebugTool, E as EntryCategory, b as LiveSupport, c as ManifestType, M as MediaKinds, d as MediaState, g as MockBigscreenPlayer, h as PauseTriggers, i as PlaybackStrategy, k as Timeline, j as TransferFormat, T as TransportControlPosition, W as WindowTypes, l as isMessage, m as isMetric, n as isTrace } from './main-81bb70d8.js';
|
|
2
2
|
import 'tslib';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MediaPlayer } from 'dashjs/index';
|
|
2
|
-
import { U as Utils, M as MediaKinds, b as LiveSupport, a as DebugTool, c as ManifestType, P as Plugins, d as MediaState, e as autoResumeAtStartOfRange, D as DOMHelpers } from './main-
|
|
2
|
+
import { U as Utils, M as MediaKinds, b as LiveSupport, a as DebugTool, c as ManifestType, P as Plugins, d as MediaState, e as autoResumeAtStartOfRange, D as DOMHelpers } from './main-81bb70d8.js';
|
|
3
3
|
import 'tslib';
|
|
4
4
|
|
|
5
5
|
function filter(manifest, representationOptions) {
|