bigscreen-player 5.3.0 → 5.4.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 { b as TimeUtils, L as LoadUrl, a as DebugTool, P as Plugins, U as Utils, D as DOMHelpers } from './main-7ed3c81d.js';
2
+ import { b as TimeUtils, L as LoadUrl, a as DebugTool, P as Plugins, U as Utils, D as DOMHelpers } from './main-d6c3a7c5.js';
3
3
 
4
4
  function IMSCSubtitles (mediaPlayer, autoStart, parentElement, mediaSources, defaultStyleOpts) {
5
5
  const SEGMENTS_TO_KEEP = 3;
@@ -261,6 +261,7 @@ function IMSCSubtitles (mediaPlayer, autoStart, parentElement, mediaSources, def
261
261
  }
262
262
 
263
263
  function start () {
264
+ stop();
264
265
  const url = mediaSources.currentSubtitlesSource();
265
266
  if (url && url !== '') {
266
267
  if (!liveSubtitles && segments.length === 0) {
@@ -1,4 +1,4 @@
1
- import { D as DOMHelpers, a as DebugTool, P as Plugins, L as LoadUrl, T as TransportControlPosition } from './main-7ed3c81d.js';
1
+ import { D as DOMHelpers, a as DebugTool, P as Plugins, L as LoadUrl, T as TransportControlPosition } from './main-d6c3a7c5.js';
2
2
 
3
3
  /**
4
4
  * Safely checks if an attribute exists on an element.
@@ -5700,12 +5700,12 @@ function StrategyPicker (windowType, isUHD) {
5700
5700
  return resolve(NativeStrategy)
5701
5701
  }
5702
5702
 
5703
- return import('./msestrategy-a2b182ce.js').then(({default: MSEStrategy}) => resolve(MSEStrategy))
5703
+ return import('./msestrategy-71f6a5d0.js').then(({default: MSEStrategy}) => resolve(MSEStrategy))
5704
5704
  .catch(() => {
5705
5705
  reject({error: 'strategyDynamicLoadError'});
5706
5706
  })
5707
5707
  } else if (window.bigscreenPlayer.playbackStrategy === PlaybackStrategy.MSE) {
5708
- return import('./msestrategy-a2b182ce.js').then(({default: MSEStrategy}) => resolve(MSEStrategy))
5708
+ return import('./msestrategy-71f6a5d0.js').then(({default: MSEStrategy}) => resolve(MSEStrategy))
5709
5709
  .catch(() => {
5710
5710
  reject({error: 'strategyDynamicLoadError'});
5711
5711
  })
@@ -6085,7 +6085,7 @@ function CallCallbacks (callbacks, data) {
6085
6085
  callbacks.forEach((callback) => DeferExceptions(() => callback(data)));
6086
6086
  }
6087
6087
 
6088
- var version = "5.3.0";
6088
+ var version = "5.4.0";
6089
6089
 
6090
6090
  var sourceList;
6091
6091
  var source;
@@ -7271,14 +7271,14 @@ function Subtitles (mediaPlayer, autoStart, playbackElement, defaultStyleOpts, m
7271
7271
  let subtitlesContainer;
7272
7272
 
7273
7273
  if (useLegacySubs) {
7274
- import('./legacysubtitles-f732130d.js').then(({default: LegacySubtitles}) => {
7274
+ import('./legacysubtitles-1a59320b.js').then(({default: LegacySubtitles}) => {
7275
7275
  subtitlesContainer = LegacySubtitles(mediaPlayer, autoStart, playbackElement, mediaSources, defaultStyleOpts);
7276
7276
  callback(subtitlesEnabled);
7277
7277
  }).catch(() => {
7278
7278
  Plugins.interface.onSubtitlesDynamicLoadError();
7279
7279
  });
7280
7280
  } else {
7281
- import('./imscsubtitles-6a505a4e.js').then(({default: IMSCSubtitles}) => {
7281
+ import('./imscsubtitles-4f194f21.js').then(({default: IMSCSubtitles}) => {
7282
7282
  subtitlesContainer = IMSCSubtitles(mediaPlayer, autoStart, playbackElement, mediaSources, defaultStyleOpts);
7283
7283
  callback(subtitlesEnabled);
7284
7284
  }).catch(() => {
@@ -7459,7 +7459,6 @@ function BigscreenPlayer () {
7459
7459
  PlayerComponent.getLiveSupport(),
7460
7460
  playerReadyCallback
7461
7461
  );
7462
-
7463
7462
  playerComponent = new PlayerComponent(
7464
7463
  playbackElement,
7465
7464
  bigscreenPlayerData,
@@ -7524,7 +7523,6 @@ function BigscreenPlayer () {
7524
7523
  * @param {BigscreenPlayerData} bigscreenPlayerData
7525
7524
  * @param {WindowTypes} newWindowType
7526
7525
  * @param {boolean} enableSubtitles - Enable subtitles on initialisation
7527
- * @param {TALDevice} newDevice - An optional TAL device object
7528
7526
  * @param {InitCallbacks} callbacks
7529
7527
  */
7530
7528
  init: (newPlaybackElement, bigscreenPlayerData, newWindowType, enableSubtitles, callbacks) => {
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-7ed3c81d.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-d6c3a7c5.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-7ed3c81d.js';
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-d6c3a7c5.js';
2
2
  import { MediaPlayer } from 'dashjs/index_mediaplayerOnly';
3
3
 
4
4
  function filter (manifest, representationOptions) {
@@ -605,6 +605,9 @@ function MSEStrategy (mediaSources, windowType, mediaKind, playbackElement, isUH
605
605
  getSeekableRange: getSeekableRange,
606
606
  getCurrentTime: getCurrentTime,
607
607
  getDuration: getDuration,
608
+ getPlayerElement: () => {
609
+ return mediaElement
610
+ },
608
611
  tearDown: () => {
609
612
  mediaPlayer.reset();
610
613
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bigscreen-player",
3
- "version": "5.3.0",
3
+ "version": "5.4.0",
4
4
  "description": "Simplified media playback for bigscreen devices.",
5
5
  "main": "dist/esm/main.js",
6
6
  "browser": "dist/esm/main.js",
@@ -28,9 +28,9 @@
28
28
  }
29
29
  },
30
30
  "devDependencies": {
31
- "@babel/core": "^7.9.6",
31
+ "@babel/core": "^7.16.12",
32
32
  "@babel/eslint-parser": "^7.14.7",
33
- "@babel/preset-env": "^7.9.6",
33
+ "@babel/preset-env": "^7.16.11",
34
34
  "@rollup/plugin-alias": "^3.1.4",
35
35
  "@rollup/plugin-babel": "^5.3.0",
36
36
  "@rollup/plugin-commonjs": "^16.0.0",
@@ -72,7 +72,7 @@
72
72
  "Streaming"
73
73
  ],
74
74
  "author": "BBC",
75
- "license": "SEE LICENCE IN LICENCE",
75
+ "license": "Apache-2.0",
76
76
  "bugs": {
77
77
  "url": "https://github.com/bbc/bigscreen-player/issues"
78
78
  },