bigscreen-player 7.1.2 → 7.1.3

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-786c4f79.js';
2
+ import { f as findSegmentTemplate, L as LoadUrl, a as DebugToolInstance, P as Plugins, U as Utils, D as DOMHelpers } from './main-3dce4f91.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-786c4f79.js';
1
+ import { D as DOMHelpers, a as DebugToolInstance, P as Plugins, L as LoadUrl, T as TransportControlPosition } from './main-3dce4f91.js';
2
2
 
3
3
  /**
4
4
  * Safely checks if an attribute exists on an element.
@@ -5795,7 +5795,7 @@ BasicStrategy.getLiveSupport = () => LiveSupport.SEEKABLE;
5795
5795
  function StrategyPicker() {
5796
5796
  return new Promise((resolve, reject) => {
5797
5797
  if (window.bigscreenPlayer.playbackStrategy === PlaybackStrategy.MSE) {
5798
- return import('./msestrategy-c74884c1.js')
5798
+ return import('./msestrategy-a5f701b3.js')
5799
5799
  .then(({ default: MSEStrategy }) => resolve(MSEStrategy))
5800
5800
  .catch(() => {
5801
5801
  reject({ error: "strategyDynamicLoadError" });
@@ -6240,7 +6240,7 @@ function CallCallbacks(callbacks, data) {
6240
6240
  }
6241
6241
  }
6242
6242
 
6243
- var version = "7.1.2";
6243
+ var version = "7.1.3";
6244
6244
 
6245
6245
  var sourceList;
6246
6246
  var source;
@@ -7632,7 +7632,7 @@ function Subtitles(mediaPlayer, autoStart, playbackElement, defaultStyleOpts, me
7632
7632
 
7633
7633
  if (available()) {
7634
7634
  if (useLegacySubs) {
7635
- import('./legacysubtitles-57538177.js')
7635
+ import('./legacysubtitles-2c5753cf.js')
7636
7636
  .then(({ default: LegacySubtitles }) => {
7637
7637
  subtitlesContainer = LegacySubtitles(mediaPlayer, autoStart, playbackElement, mediaSources, defaultStyleOpts);
7638
7638
  callback(subtitlesEnabled);
@@ -7641,7 +7641,7 @@ function Subtitles(mediaPlayer, autoStart, playbackElement, defaultStyleOpts, me
7641
7641
  Plugins.interface.onSubtitlesDynamicLoadError();
7642
7642
  });
7643
7643
  } else {
7644
- import('./imscsubtitles-db803024.js')
7644
+ import('./imscsubtitles-991842c5.js')
7645
7645
  .then(({ default: IMSCSubtitles }) => {
7646
7646
  subtitlesContainer = IMSCSubtitles(mediaPlayer, autoStart, playbackElement, mediaSources, defaultStyleOpts);
7647
7647
  callback(subtitlesEnabled);
@@ -8055,17 +8055,29 @@ function BigscreenPlayer() {
8055
8055
  }
8056
8056
  },
8057
8057
 
8058
+ /**
8059
+ * Set the media element playback rate
8060
+ *
8061
+ * @function
8062
+ * @param {Number} rate
8063
+ */
8058
8064
  setPlaybackRate: (rate) => {
8059
8065
  if (playerComponent) {
8060
8066
  playerComponent.setPlaybackRate(rate);
8061
8067
  }
8062
8068
  },
8063
8069
 
8070
+ /**
8071
+ * Get the current playback rate
8072
+ * @function
8073
+ * @returns {Number} the current media playback rate
8074
+ */
8064
8075
  getPlaybackRate: () => playerComponent && playerComponent.getPlaybackRate(),
8065
8076
 
8066
8077
  /**
8067
8078
  * Returns the media asset's current time in seconds.
8068
8079
  * @function
8080
+ * @returns {Number}
8069
8081
  */
8070
8082
  getCurrentTime: () => (playerComponent && playerComponent.getCurrentTime()) || 0,
8071
8083
 
@@ -8158,11 +8170,25 @@ function BigscreenPlayer() {
8158
8170
  playerComponent.pause(opts);
8159
8171
  },
8160
8172
 
8173
+ /**
8174
+ * Resize the video container div in the most compatible way
8175
+ *
8176
+ * @function
8177
+ * @param {Number} top - px
8178
+ * @param {Number} left - px
8179
+ * @param {Number} width - px
8180
+ * @param {Number} height - px
8181
+ * @param {Number} zIndex
8182
+ */
8161
8183
  resize: (top, left, width, height, zIndex) => {
8162
8184
  subtitles.hide();
8163
8185
  resizer.resize(playbackElement, top, left, width, height, zIndex);
8164
8186
  },
8165
8187
 
8188
+ /**
8189
+ * Clear any resize properties added with `resize`
8190
+ * @function
8191
+ */
8166
8192
  clearResize: () => {
8167
8193
  if (subtitles.enabled()) {
8168
8194
  subtitles.show();
@@ -8191,21 +8217,41 @@ function BigscreenPlayer() {
8191
8217
  */
8192
8218
  isSubtitlesAvailable,
8193
8219
 
8220
+ /**
8221
+ * Returns if a device supports the customisation of subtitles
8222
+ *
8223
+ * @returns boolean
8224
+ */
8194
8225
  areSubtitlesCustomisable: () =>
8195
8226
  !(window.bigscreenPlayer && window.bigscreenPlayer.overrides && window.bigscreenPlayer.overrides.legacySubtitles),
8196
8227
 
8228
+ /**
8229
+ * Customise the rendered subitles style
8230
+ *
8231
+ * @param {SubtitlesCustomisationOptions} styleOpts
8232
+ */
8197
8233
  customiseSubtitles: (styleOpts) => {
8198
8234
  if (subtitles) {
8199
8235
  subtitles.customise(styleOpts);
8200
8236
  }
8201
8237
  },
8202
8238
 
8239
+ /**
8240
+ * Render an example subtitles string with a given style and location
8241
+ *
8242
+ * @param {String} xmlString - EBU-TT-D compliant XML String
8243
+ * @param {SubtitlesCustomisationOptions} styleOpts - {@link SubtitlesCustomisationOptions}
8244
+ * @param {SubtitlesSafePosition} safePosition - {@link SubtitlesSafePosition}
8245
+ */
8203
8246
  renderSubtitleExample: (xmlString, styleOpts, safePosition) => {
8204
8247
  if (subtitles) {
8205
8248
  subtitles.renderExample(xmlString, styleOpts, safePosition);
8206
8249
  }
8207
8250
  },
8208
8251
 
8252
+ /**
8253
+ * Clear the example subtitle string
8254
+ */
8209
8255
  clearSubtitleExample: () => {
8210
8256
  if (subtitles) {
8211
8257
  subtitles.clearExample();
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-786c4f79.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-3dce4f91.js';
@@ -1,4 +1,4 @@
1
- import { W as WindowTypes, U as Utils, D as DOMHelpers, b as LiveSupport, M as MediaState, a as DebugToolInstance, P as Plugins, c as MediaKinds, d as TimeUtils, e as DynamicWindowUtils } from './main-786c4f79.js';
1
+ import { W as WindowTypes, U as Utils, D as DOMHelpers, b as LiveSupport, M as MediaState, a as DebugToolInstance, P as Plugins, c as MediaKinds, d as TimeUtils, e as DynamicWindowUtils } from './main-3dce4f91.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": "7.1.2",
3
+ "version": "7.1.3",
4
4
  "description": "Simplified media playback for bigscreen devices.",
5
5
  "main": "dist/esm/main.js",
6
6
  "browser": "dist/esm/main.js",