bigscreen-player 7.2.0 → 7.2.1

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 DebugToolInstance, P as Plugins, U as Utils, D as DOMHelpers } from './main-70e914fd.js';
2
+ import { f as findSegmentTemplate, L as LoadUrl, a as DebugToolInstance, P as Plugins, U as Utils, D as DOMHelpers } from './main-d8bb0025.js';
3
3
 
4
4
  const SEGMENTS_BUFFER_SIZE = 3;
5
5
  const LOAD_ERROR_COUNT_MAX = 3;
@@ -78,7 +78,24 @@ function IMSCSubtitles(mediaPlayer, autoStart, parentElement, mediaSources, defa
78
78
  }
79
79
 
80
80
  try {
81
- const xml = fromXML(responseText.split(/<\?xml[^?]+\?>/i)[1] || responseText);
81
+ const preTrimTime = Date.now();
82
+
83
+ const xmlText = isSubtitlesWhole()
84
+ ? responseText.replace(/^.*<\?xml[^?]+\?>/i, "")
85
+ : responseText.split(/<\?xml[^?]+\?>/i)[1] || responseText;
86
+
87
+ if (isSubtitlesWhole()) {
88
+ DebugToolInstance.info(`XML trim duration: ${Date.now() - preTrimTime}`);
89
+ }
90
+
91
+ const preParseTime = Date.now();
92
+
93
+ const xml = fromXML(xmlText);
94
+
95
+ if (isSubtitlesWhole()) {
96
+ DebugToolInstance.info(`XML parse duration: ${Date.now() - preParseTime}`);
97
+ }
98
+
82
99
  const times = xml.getMediaTimeEvents();
83
100
 
84
101
  segments.push({
@@ -1,4 +1,4 @@
1
- import { D as DOMHelpers, a as DebugToolInstance, P as Plugins, L as LoadUrl, T as TransportControlPosition } from './main-70e914fd.js';
1
+ import { D as DOMHelpers, a as DebugToolInstance, P as Plugins, L as LoadUrl, T as TransportControlPosition } from './main-d8bb0025.js';
2
2
 
3
3
  /**
4
4
  * Safely checks if an attribute exists on an element.
@@ -5936,7 +5936,7 @@ BasicStrategy.getLiveSupport = () => LiveSupport.SEEKABLE;
5936
5936
  function StrategyPicker() {
5937
5937
  return new Promise((resolve, reject) => {
5938
5938
  if (window.bigscreenPlayer.playbackStrategy === PlaybackStrategy.MSE) {
5939
- return import('./msestrategy-41492b38.js')
5939
+ return import('./msestrategy-d9bfcee2.js')
5940
5940
  .then(({ default: MSEStrategy }) => resolve(MSEStrategy))
5941
5941
  .catch(() => {
5942
5942
  reject({ error: "strategyDynamicLoadError" });
@@ -6385,7 +6385,7 @@ function CallCallbacks(callbacks, data) {
6385
6385
  }
6386
6386
  }
6387
6387
 
6388
- var Version = "7.2.0";
6388
+ var Version = "7.2.1";
6389
6389
 
6390
6390
  var sourceList;
6391
6391
  var source;
@@ -7777,7 +7777,7 @@ function Subtitles(mediaPlayer, autoStart, playbackElement, defaultStyleOpts, me
7777
7777
 
7778
7778
  if (available()) {
7779
7779
  if (useLegacySubs) {
7780
- import('./legacysubtitles-33f2dd7e.js')
7780
+ import('./legacysubtitles-16e7299b.js')
7781
7781
  .then(({ default: LegacySubtitles }) => {
7782
7782
  subtitlesContainer = LegacySubtitles(mediaPlayer, autoStart, playbackElement, mediaSources, defaultStyleOpts);
7783
7783
  callback(subtitlesEnabled);
@@ -7786,7 +7786,7 @@ function Subtitles(mediaPlayer, autoStart, playbackElement, defaultStyleOpts, me
7786
7786
  Plugins.interface.onSubtitlesDynamicLoadError();
7787
7787
  });
7788
7788
  } else {
7789
- import('./imscsubtitles-92685a59.js')
7789
+ import('./imscsubtitles-7ee16bff.js')
7790
7790
  .then(({ default: IMSCSubtitles }) => {
7791
7791
  subtitlesContainer = IMSCSubtitles(mediaPlayer, autoStart, playbackElement, mediaSources, defaultStyleOpts);
7792
7792
  callback(subtitlesEnabled);
package/dist/esm/main.js CHANGED
@@ -1 +1 @@
1
- export { B as BigscreenPlayer, a as DebugTool, E as EntryCategory, b as LiveSupport, c as MediaKinds, M as MediaState, g as MockBigscreenPlayer, h 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-70e914fd.js';
1
+ export { B as BigscreenPlayer, a as DebugTool, E as EntryCategory, b as LiveSupport, c as MediaKinds, M as MediaState, g as MockBigscreenPlayer, h 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-d8bb0025.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 LiveSupport, a as DebugToolInstance, M as MediaState, P as Plugins, c as MediaKinds, d as TimeUtils, e as DynamicWindowUtils } from './main-70e914fd.js';
2
+ import { W as WindowTypes, U as Utils, D as DOMHelpers, b as LiveSupport, a as DebugToolInstance, M as MediaState, P as Plugins, c as MediaKinds, d as TimeUtils, e as DynamicWindowUtils } from './main-d8bb0025.js';
3
3
 
4
4
  function filter(manifest, representationOptions) {
5
5
  const constantFps = representationOptions.constantFps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bigscreen-player",
3
- "version": "7.2.0",
3
+ "version": "7.2.1",
4
4
  "type": "module",
5
5
  "description": "Simplified media playback for bigscreen devices.",
6
6
  "main": "dist/esm/main.js",