bigscreen-player 5.5.0 → 5.5.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 { b as TimeUtils, L as LoadUrl, a as DebugTool, P as Plugins, U as Utils, D as DOMHelpers } from './main-f63b6e0d.js';
2
+ import { b as TimeUtils, L as LoadUrl, a as DebugTool, P as Plugins, U as Utils, D as DOMHelpers } from './main-3406c105.js';
3
3
 
4
4
  function IMSCSubtitles (mediaPlayer, autoStart, parentElement, mediaSources, defaultStyleOpts) {
5
5
  const SEGMENTS_TO_KEEP = 3;
@@ -1,4 +1,4 @@
1
- import { D as DOMHelpers, a as DebugTool, P as Plugins, L as LoadUrl, T as TransportControlPosition } from './main-f63b6e0d.js';
1
+ import { D as DOMHelpers, a as DebugTool, P as Plugins, L as LoadUrl, T as TransportControlPosition } from './main-3406c105.js';
2
2
 
3
3
  /**
4
4
  * Safely checks if an attribute exists on an element.
@@ -5730,12 +5730,12 @@ function StrategyPicker (windowType, isUHD) {
5730
5730
  return resolve(NativeStrategy)
5731
5731
  }
5732
5732
 
5733
- return import('./msestrategy-d0305f42.js').then(({default: MSEStrategy}) => resolve(MSEStrategy))
5733
+ return import('./msestrategy-5530648b.js').then(({default: MSEStrategy}) => resolve(MSEStrategy))
5734
5734
  .catch(() => {
5735
5735
  reject({error: 'strategyDynamicLoadError'});
5736
5736
  })
5737
5737
  } else if (window.bigscreenPlayer.playbackStrategy === PlaybackStrategy.MSE) {
5738
- return import('./msestrategy-d0305f42.js').then(({default: MSEStrategy}) => resolve(MSEStrategy))
5738
+ return import('./msestrategy-5530648b.js').then(({default: MSEStrategy}) => resolve(MSEStrategy))
5739
5739
  .catch(() => {
5740
5740
  reject({error: 'strategyDynamicLoadError'});
5741
5741
  })
@@ -6127,7 +6127,7 @@ function CallCallbacks (callbacks, data) {
6127
6127
  callbacks.forEach((callback) => DeferExceptions(() => callback(data)));
6128
6128
  }
6129
6129
 
6130
- var version = "5.5.0";
6130
+ var version = "5.5.1";
6131
6131
 
6132
6132
  var sourceList;
6133
6133
  var source;
@@ -7307,14 +7307,14 @@ function Subtitles (mediaPlayer, autoStart, playbackElement, defaultStyleOpts, m
7307
7307
  let subtitlesContainer;
7308
7308
 
7309
7309
  if (useLegacySubs) {
7310
- import('./legacysubtitles-9cf8b751.js').then(({default: LegacySubtitles}) => {
7310
+ import('./legacysubtitles-88ab9582.js').then(({default: LegacySubtitles}) => {
7311
7311
  subtitlesContainer = LegacySubtitles(mediaPlayer, autoStart, playbackElement, mediaSources, defaultStyleOpts);
7312
7312
  callback(subtitlesEnabled);
7313
7313
  }).catch(() => {
7314
7314
  Plugins.interface.onSubtitlesDynamicLoadError();
7315
7315
  });
7316
7316
  } else {
7317
- import('./imscsubtitles-26f24b02.js').then(({default: IMSCSubtitles}) => {
7317
+ import('./imscsubtitles-05792f1d.js').then(({default: IMSCSubtitles}) => {
7318
7318
  subtitlesContainer = IMSCSubtitles(mediaPlayer, autoStart, playbackElement, mediaSources, defaultStyleOpts);
7319
7319
  callback(subtitlesEnabled);
7320
7320
  }).catch(() => {
package/dist/esm/main.js CHANGED
@@ -1 +1 @@
1
- export { B as BigscreenPlayer, c as LiveSupport, d as MediaKinds, M as MediaState, f as MockBigscreenPlayer, g as PauseTriggers, h as PlaybackStrategy, i as TransferFormat, T as TransportControlPosition, W as WindowTypes } from './main-f63b6e0d.js';
1
+ export { B as BigscreenPlayer, c as LiveSupport, d as MediaKinds, M as MediaState, f as MockBigscreenPlayer, g as PauseTriggers, h as PlaybackStrategy, i as TransferFormat, T as TransportControlPosition, W as WindowTypes } from './main-3406c105.js';
@@ -1,4 +1,4 @@
1
- import { D as DOMHelpers, W as WindowTypes, c as LiveSupport, M as MediaState, a as DebugTool, P as Plugins, d as MediaKinds, U as Utils, b as TimeUtils, e as DynamicWindowUtils } from './main-f63b6e0d.js';
1
+ import { U as Utils, D as DOMHelpers, W as WindowTypes, c as LiveSupport, M as MediaState, a as DebugTool, P as Plugins, d as MediaKinds, b as TimeUtils, e as DynamicWindowUtils } from './main-3406c105.js';
2
2
  import { MediaPlayer } from 'dashjs/index_mediaplayerOnly';
3
3
 
4
4
  function filter (manifest, representationOptions) {
@@ -111,8 +111,6 @@ var ManifestModifier = {
111
111
  };
112
112
 
113
113
  function MSEStrategy (mediaSources, windowType, mediaKind, playbackElement, isUHD, customPlayerSettings) {
114
- const LIVE_DELAY_SECONDS = 1.1;
115
-
116
114
  let mediaPlayer;
117
115
  let mediaElement;
118
116
 
@@ -141,6 +139,18 @@ function MSEStrategy (mediaSources, windowType, mediaKind, playbackElement, isUH
141
139
  }
142
140
  };
143
141
 
142
+ let playerSettings = Utils.merge({
143
+ debug: {
144
+ logLevel: 2
145
+ },
146
+ streaming: {
147
+ liveDelay: 1.1,
148
+ bufferToKeep: 4,
149
+ bufferTimeAtTopQuality: 12,
150
+ bufferTimeAtTopQualityLongForm: 15
151
+ }
152
+ }, customPlayerSettings);
153
+
144
154
  const DashJSEvents = {
145
155
  LOG: 'log',
146
156
  ERROR: 'error',
@@ -425,7 +435,7 @@ function MSEStrategy (mediaSources, windowType, mediaKind, playbackElement, isUH
425
435
  }
426
436
 
427
437
  function getClampedTime (time, range) {
428
- return Math.min(Math.max(time, range.start), range.end - LIVE_DELAY_SECONDS)
438
+ return Math.min(Math.max(time, range.start), range.end - playerSettings.streaming.liveDelay)
429
439
  }
430
440
 
431
441
  function load (mimeType, playbackTime) {
@@ -455,17 +465,6 @@ function MSEStrategy (mediaSources, windowType, mediaKind, playbackElement, isUH
455
465
 
456
466
  function setUpMediaPlayer (playbackTime) {
457
467
  mediaPlayer = MediaPlayer().create();
458
- const playerSettings = Utils.merge({
459
- debug: {
460
- logLevel: 2
461
- },
462
- streaming: {
463
- liveDelay: LIVE_DELAY_SECONDS,
464
- bufferToKeep: 4,
465
- bufferTimeAtTopQuality: 12,
466
- bufferTimeAtTopQualityLongForm: 15
467
- }
468
- }, customPlayerSettings);
469
468
  mediaPlayer.updateSettings(playerSettings);
470
469
  mediaPlayer.initialize(mediaElement, null, true);
471
470
  modifySource(playbackTime);
@@ -527,7 +526,7 @@ function MSEStrategy (mediaSources, windowType, mediaKind, playbackElement, isUH
527
526
  if (dvrInfo) {
528
527
  return {
529
528
  start: dvrInfo.range.start - timeCorrection,
530
- end: dvrInfo.range.end - timeCorrection
529
+ end: dvrInfo.range.end - timeCorrection - playerSettings.streaming.liveDelay
531
530
  }
532
531
  }
533
532
  }
@@ -562,7 +561,7 @@ function MSEStrategy (mediaSources, windowType, mediaKind, playbackElement, isUH
562
561
 
563
562
  function calculateSeekOffset (time) {
564
563
  function getClampedTimeForLive (time) {
565
- return Math.min(Math.max(time, 0), mediaPlayer.getDVRWindowSize() - LIVE_DELAY_SECONDS)
564
+ return Math.min(Math.max(time, 0), mediaPlayer.getDVRWindowSize() - playerSettings.streaming.liveDelay)
566
565
  }
567
566
 
568
567
  if (windowType === WindowTypes.SLIDING) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bigscreen-player",
3
- "version": "5.5.0",
3
+ "version": "5.5.1",
4
4
  "description": "Simplified media playback for bigscreen devices.",
5
5
  "main": "dist/esm/main.js",
6
6
  "browser": "dist/esm/main.js",