bigscreen-player 6.0.7 → 6.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.
@@ -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-7fa1138c.js';
2
+ import { f as findSegmentTemplate, L as LoadUrl, a as DebugTool, P as Plugins, U as Utils, D as DOMHelpers } from './main-d1def369.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 DebugTool, P as Plugins, L as LoadUrl, T as TransportControlPosition } from './main-7fa1138c.js';
1
+ import { D as DOMHelpers, a as DebugTool, P as Plugins, L as LoadUrl, T as TransportControlPosition } from './main-d1def369.js';
2
2
 
3
3
  /**
4
4
  * Safely checks if an attribute exists on an element.
@@ -5771,7 +5771,7 @@ BasicStrategy.getLiveSupport = () => LiveSupport.SEEKABLE;
5771
5771
  function StrategyPicker() {
5772
5772
  return new Promise((resolve, reject) => {
5773
5773
  if (window.bigscreenPlayer.playbackStrategy === PlaybackStrategy.MSE) {
5774
- return import('./msestrategy-d6af2047.js')
5774
+ return import('./msestrategy-5313322e.js')
5775
5775
  .then(({ default: MSEStrategy }) => resolve(MSEStrategy))
5776
5776
  .catch(() => {
5777
5777
  reject({ error: "strategyDynamicLoadError" });
@@ -6217,7 +6217,7 @@ function CallCallbacks(callbacks, data) {
6217
6217
  }
6218
6218
  }
6219
6219
 
6220
- var version = "6.0.7";
6220
+ var version = "6.1.0";
6221
6221
 
6222
6222
  var sourceList;
6223
6223
  var source;
@@ -7586,20 +7586,33 @@ function ReadyHelper(initialPlaybackTime, windowType, liveSupport, callback) {
7586
7586
 
7587
7587
  function Subtitles(mediaPlayer, autoStart, playbackElement, defaultStyleOpts, mediaSources, callback) {
7588
7588
  const useLegacySubs = window.bigscreenPlayer?.overrides?.legacySubtitles ?? false;
7589
+ const isSeekableLiveSupport =
7590
+ window.bigscreenPlayer.liveSupport == null || window.bigscreenPlayer.liveSupport === "seekable";
7589
7591
 
7590
7592
  let subtitlesEnabled = autoStart;
7591
7593
  let subtitlesContainer;
7592
7594
 
7593
- if (useLegacySubs && available()) {
7594
- import('./legacysubtitles-69494766.js')
7595
- .then(({ default: LegacySubtitles }) => {
7596
- subtitlesContainer = LegacySubtitles(mediaPlayer, autoStart, playbackElement, mediaSources, defaultStyleOpts);
7597
- callback(subtitlesEnabled);
7598
- })
7599
- .catch(() => {
7600
- Plugins.interface.onSubtitlesDynamicLoadError();
7601
- });
7602
- } else if (useLegacySubs) {
7595
+ if (available()) {
7596
+ if (useLegacySubs) {
7597
+ import('./legacysubtitles-d83d41ee.js')
7598
+ .then(({ default: LegacySubtitles }) => {
7599
+ subtitlesContainer = LegacySubtitles(mediaPlayer, autoStart, playbackElement, mediaSources, defaultStyleOpts);
7600
+ callback(subtitlesEnabled);
7601
+ })
7602
+ .catch(() => {
7603
+ Plugins.interface.onSubtitlesDynamicLoadError();
7604
+ });
7605
+ } else {
7606
+ import('./imscsubtitles-be1b1b28.js')
7607
+ .then(({ default: IMSCSubtitles }) => {
7608
+ subtitlesContainer = IMSCSubtitles(mediaPlayer, autoStart, playbackElement, mediaSources, defaultStyleOpts);
7609
+ callback(subtitlesEnabled);
7610
+ })
7611
+ .catch(() => {
7612
+ Plugins.interface.onSubtitlesDynamicLoadError();
7613
+ });
7614
+ }
7615
+ } else {
7603
7616
  /* This is needed to deal with a race condition wherein the Subtitles Callback runs before the Subtitles object
7604
7617
  * has finished construction. This is leveraging a feature of the Javascript Event Loop, specifically how it interacts
7605
7618
  * with Promises, called Microtasks.
@@ -7607,16 +7620,9 @@ function Subtitles(mediaPlayer, autoStart, playbackElement, defaultStyleOpts, me
7607
7620
  * For more information, please see:
7608
7621
  * https://developer.mozilla.org/en-US/docs/Web/API/HTML_DOM_API/Microtask_guide
7609
7622
  */
7610
- Promise.resolve().then(() => callback(subtitlesEnabled));
7611
- } else {
7612
- import('./imscsubtitles-5bdc1e7e.js')
7613
- .then(({ default: IMSCSubtitles }) => {
7614
- subtitlesContainer = IMSCSubtitles(mediaPlayer, autoStart, playbackElement, mediaSources, defaultStyleOpts);
7615
- callback(subtitlesEnabled);
7616
- })
7617
- .catch(() => {
7618
- Plugins.interface.onSubtitlesDynamicLoadError();
7619
- });
7623
+ Promise.resolve().then(() => {
7624
+ callback(subtitlesEnabled);
7625
+ });
7620
7626
  }
7621
7627
 
7622
7628
  function enable() {
@@ -7652,7 +7658,7 @@ function Subtitles(mediaPlayer, autoStart, playbackElement, defaultStyleOpts, me
7652
7658
 
7653
7659
  const isWhole = findSegmentTemplate(url) == null;
7654
7660
 
7655
- return isWhole || !useLegacySubs
7661
+ return isWhole || (!useLegacySubs && isSeekableLiveSupport)
7656
7662
  }
7657
7663
 
7658
7664
  function setPosition(position) {
package/dist/esm/main.js CHANGED
@@ -1 +1 @@
1
- export { B as BigscreenPlayer, 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 } from './main-7fa1138c.js';
1
+ export { B as BigscreenPlayer, 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 } from './main-d1def369.js';
@@ -1,4 +1,4 @@
1
- import { U as Utils, D as DOMHelpers, W as WindowTypes, b as LiveSupport, M as MediaState, a as DebugTool, P as Plugins, c as MediaKinds, d as TimeUtils, e as DynamicWindowUtils } from './main-7fa1138c.js';
1
+ import { U as Utils, D as DOMHelpers, W as WindowTypes, b as LiveSupport, M as MediaState, a as DebugTool, P as Plugins, c as MediaKinds, d as TimeUtils, e as DynamicWindowUtils } from './main-d1def369.js';
2
2
  import { MediaPlayer } from 'dashjs/index_mediaplayerOnly';
3
3
 
4
4
  function filter(manifest, representationOptions) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bigscreen-player",
3
- "version": "6.0.7",
3
+ "version": "6.1.0",
4
4
  "description": "Simplified media playback for bigscreen devices.",
5
5
  "main": "dist/esm/main.js",
6
6
  "browser": "dist/esm/main.js",