bigscreen-player 8.4.2 → 8.5.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 DebugToolInstance, P as Plugins, U as Utils, D as DOMHelpers } from './main-3fb68b6f.js';
2
+ import { f as findSegmentTemplate, L as LoadUrl, a as DebugToolInstance, P as Plugins, U as Utils, D as DOMHelpers } from './main-e9ef0f50.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-3fb68b6f.js';
1
+ import { D as DOMHelpers, a as DebugToolInstance, P as Plugins, L as LoadUrl, T as TransportControlPosition } from './main-e9ef0f50.js';
2
2
 
3
3
  /**
4
4
  * Safely checks if an attribute exists on an element.
@@ -252,7 +252,7 @@ function callOnAllPlugins(funcKey, evt) {
252
252
  const clonedEvent = Utils.deepClone(evt);
253
253
  const selectedPlugins = plugins
254
254
  .filter((plugin) => plugin[funcKey] && typeof plugin[funcKey] === "function")
255
- .map((plugin) => plugin[funcKey]);
255
+ .map((plugin) => plugin[funcKey].bind(plugin));
256
256
 
257
257
  CallCallbacks(selectedPlugins, clonedEvent);
258
258
  }
@@ -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-2a46df0e.js')
5963
+ return import('./msestrategy-6447183c.js')
5964
5964
  .then(({ default: MSEStrategy }) => resolve(MSEStrategy))
5965
5965
  .catch(() => {
5966
5966
  reject({ error: "strategyDynamicLoadError" });
@@ -6030,7 +6030,8 @@ function PlayerComponent(
6030
6030
  function pause(opts = {}) {
6031
6031
  if (transitions().canBePaused()) {
6032
6032
  const disableAutoResume = _windowType === WindowTypes.GROWING ? true : opts.disableAutoResume;
6033
- playbackStrategy && playbackStrategy.pause({ disableAutoResume });
6033
+
6034
+ playbackStrategy && playbackStrategy.pause({ disableAutoResume, pauseTrigger: opts.pauseTrigger });
6034
6035
  }
6035
6036
  }
6036
6037
 
@@ -6131,22 +6132,21 @@ function PlayerComponent(
6131
6132
 
6132
6133
  function eventCallback(mediaState) {
6133
6134
  switch (mediaState) {
6134
- case MediaState.PLAYING: {
6135
+ case MediaState.PLAYING:
6135
6136
  onPlaying();
6136
6137
  break
6137
- }
6138
- case MediaState.PAUSED: {
6138
+
6139
+ case MediaState.PAUSED:
6139
6140
  onPaused();
6140
6141
  break
6141
- }
6142
- case MediaState.WAITING: {
6142
+
6143
+ case MediaState.WAITING:
6143
6144
  onBuffering();
6144
6145
  break
6145
- }
6146
- case MediaState.ENDED: {
6146
+
6147
+ case MediaState.ENDED:
6147
6148
  onEnded();
6148
6149
  break
6149
- }
6150
6150
  }
6151
6151
  }
6152
6152
 
@@ -6383,7 +6383,7 @@ const PauseTriggers = {
6383
6383
  DEVICE: 3,
6384
6384
  };
6385
6385
 
6386
- var Version = "8.4.2";
6386
+ var Version = "8.5.0";
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-a417014a.js')
7737
+ import('./legacysubtitles-46b9ab26.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-3c8a6f17.js')
7746
+ import('./imscsubtitles-bc7164a3.js')
7747
7747
  .then(({ default: IMSCSubtitles }) => {
7748
7748
  subtitlesContainer = IMSCSubtitles(mediaPlayer, autoStart, playbackElement, mediaSources, defaultStyleOpts);
7749
7749
  callback(subtitlesEnabled);
@@ -8281,7 +8281,7 @@ function BigscreenPlayer() {
8281
8281
  DebugToolInstance.apicall("pause");
8282
8282
 
8283
8283
  pauseTrigger = opts && opts.userPause === false ? PauseTriggers.APP : PauseTriggers.USER;
8284
- playerComponent.pause(opts);
8284
+ playerComponent.pause({ pauseTrigger, ...opts });
8285
8285
  },
8286
8286
 
8287
8287
  /**
@@ -8530,4 +8530,4 @@ const TransportControlPosition = {
8530
8530
  FULLSCREEN: 16,
8531
8531
  };
8532
8532
 
8533
- export { BigscreenPlayer as B, DOMHelpers as D, EntryCategory as E, LoadUrl as L, MediaState as M, Plugins as P, TransportControlPosition as T, Utils as U, WindowTypes as W, DebugToolInstance as a, LiveSupport as b, MediaKinds as c, TimeUtils as d, DynamicWindowUtils as e, findSegmentTemplate as f, MockBigscreenPlayer as g, PauseTriggers as h, PlaybackStrategy as i, TransferFormat as j, isMessage as k, isMetric as l, isTrace as m };
8533
+ export { BigscreenPlayer as B, DOMHelpers as D, EntryCategory as E, LoadUrl as L, MediaState as M, Plugins as P, TransportControlPosition as T, Utils as U, WindowTypes as W, DebugToolInstance as a, PauseTriggers as b, LiveSupport as c, MediaKinds as d, TimeUtils as e, findSegmentTemplate as f, DynamicWindowUtils as g, MockBigscreenPlayer as h, PlaybackStrategy as i, TransferFormat as j, isMessage as k, isMetric as l, isTrace as m };
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-3fb68b6f.js';
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-e9ef0f50.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-3fb68b6f.js';
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-e9ef0f50.js';
3
3
 
4
4
  function filter(manifest, representationOptions) {
5
5
  const constantFps = representationOptions.constantFps;
@@ -848,7 +848,7 @@ function MSEStrategy(mediaSources, windowType, mediaKind, playbackElement, isUHD
848
848
  isEnded: () => isEnded,
849
849
  isPaused,
850
850
  pause: (opts = {}) => {
851
- if (windowType === WindowTypes.SLIDING) {
851
+ if (windowType === WindowTypes.SLIDING && opts.pauseTrigger === PauseTriggers.APP) {
852
852
  slidingWindowPausedTime = Date.now();
853
853
  }
854
854
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bigscreen-player",
3
- "version": "8.4.2",
3
+ "version": "8.5.0",
4
4
  "type": "module",
5
5
  "description": "Simplified media playback for bigscreen devices.",
6
6
  "main": "dist/esm/main.js",