bigscreen-player 8.2.2 → 8.2.4

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-98c741f8.js';
2
+ import { f as findSegmentTemplate, L as LoadUrl, a as DebugToolInstance, P as Plugins, U as Utils, D as DOMHelpers } from './main-9f5984e2.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-98c741f8.js';
1
+ import { D as DOMHelpers, a as DebugToolInstance, P as Plugins, L as LoadUrl, T as TransportControlPosition } from './main-9f5984e2.js';
2
2
 
3
3
  /**
4
4
  * Safely checks if an attribute exists on an element.
@@ -672,7 +672,8 @@ class DebugViewController {
672
672
  return Object.assign(Object.assign({}, entry), { category: "union", kind: "media-element-state", data: Object.assign(Object.assign({}, prevData), { [kind]: data }) });
673
673
  }
674
674
  cacheEntry(entry) {
675
- switch (entry.category) {
675
+ const { category } = entry;
676
+ switch (category) {
676
677
  case EntryCategory.METRIC:
677
678
  return this.cacheStaticEntry(this.isMerged(entry) ? this.mergeMediaState(entry) : entry);
678
679
  case EntryCategory.MESSAGE:
@@ -681,9 +682,7 @@ class DebugViewController {
681
682
  if (this.dynamicEntries.length >= DYNAMIC_ENTRY_LIMIT) {
682
683
  this.dynamicEntries = this.dynamicEntries.slice(-DYNAMIC_ENTRY_LIMIT);
683
684
  }
684
- return;
685
- default:
686
- throw new TypeError("Unrecognised entry type");
685
+ break;
687
686
  }
688
687
  }
689
688
  cacheStaticEntry(entry) {
@@ -722,8 +721,6 @@ class DebugViewController {
722
721
  case EntryCategory.TRACE:
723
722
  formattedData = this.serialiseTrace(entry);
724
723
  break;
725
- default:
726
- throw new TypeError(`Unrecognised Entry Category: ${category}`);
727
724
  }
728
725
  const sessionTime = new Date(entry.sessionTime);
729
726
  const formatedSessionTime = `${formatDate(sessionTime)}.${zeroPadMs(sessionTime.getUTCMilliseconds())}`;
@@ -738,8 +735,6 @@ class DebugViewController {
738
735
  return `Info: ${data}`;
739
736
  case "warning":
740
737
  return `Warning: ${data}`;
741
- default:
742
- throw new TypeError(`Unrecognised message level '${kind}'`);
743
738
  }
744
739
  }
745
740
  serialiseTime(time) {
@@ -750,6 +745,11 @@ class DebugViewController {
750
745
  var _a;
751
746
  const { currentElementTime, kind, data } = trace;
752
747
  switch (kind) {
748
+ case "apicall": {
749
+ const { functionName, functionArgs } = data;
750
+ const argsPart = functionArgs.length === 0 ? "" : ` with args [${functionArgs.join(", ")}]`;
751
+ return `Called '${functionName}${argsPart}'`;
752
+ }
753
753
  case "buffered-ranges": {
754
754
  const buffered = data.buffered.map(([start, end]) => `${start.toFixed(2)} - ${end.toFixed(2)}`).join(", ");
755
755
  return `Buffered ${data.kind}: [${buffered}] at current time ${currentElementTime.toFixed(2)}`;
@@ -760,14 +760,20 @@ class DebugViewController {
760
760
  const { eventType, eventTarget } = data;
761
761
  return `Event: '${eventType}' from ${eventTarget}`;
762
762
  }
763
+ case "gap": {
764
+ const { from, to } = data;
765
+ return `Gap from ${from} to ${to}`;
766
+ }
763
767
  case "session-start":
764
768
  return `Playback session started at ${new Date(data).toISOString().replace("T", " ")}`;
765
769
  case "session-end":
766
770
  return `Playback session ended at ${new Date(data).toISOString().replace("T", " ")}`;
771
+ case "quota-exceeded": {
772
+ const { bufferLevel, time } = data;
773
+ return `Quota exceeded with buffer level ${bufferLevel} at chunk start time ${time}`;
774
+ }
767
775
  case "state-change":
768
776
  return `Event: ${invertedMediaState[data]}`;
769
- default:
770
- throw new TypeError(`Unrecognised trace kind: ${kind}`);
771
777
  }
772
778
  }
773
779
  serialiseStaticEntry(entry) {
@@ -808,7 +814,7 @@ class DebugViewController {
808
814
  const [qualityIndex, bitrate] = data;
809
815
  return `${qualityIndex} (${bitrate} kbps)`;
810
816
  }
811
- return data.join(", ");
817
+ return data.join(", ");
812
818
  }
813
819
  render() {
814
820
  DebugView.render({
@@ -5934,7 +5940,7 @@ BasicStrategy.getLiveSupport = () => LiveSupport.SEEKABLE;
5934
5940
  function StrategyPicker() {
5935
5941
  return new Promise((resolve, reject) => {
5936
5942
  if (window.bigscreenPlayer.playbackStrategy === PlaybackStrategy.MSE) {
5937
- return import('./msestrategy-9bfd05cd.js')
5943
+ return import('./msestrategy-d0523552.js')
5938
5944
  .then(({ default: MSEStrategy }) => resolve(MSEStrategy))
5939
5945
  .catch(() => {
5940
5946
  reject({ error: "strategyDynamicLoadError" });
@@ -6381,7 +6387,7 @@ function CallCallbacks(callbacks, data) {
6381
6387
  }
6382
6388
  }
6383
6389
 
6384
- var Version = "8.2.2";
6390
+ var Version = "8.2.4";
6385
6391
 
6386
6392
  var sourceList;
6387
6393
  var source;
@@ -7732,7 +7738,7 @@ function Subtitles(mediaPlayer, autoStart, playbackElement, defaultStyleOpts, me
7732
7738
 
7733
7739
  if (available()) {
7734
7740
  if (useLegacySubs) {
7735
- import('./legacysubtitles-c0af01e0.js')
7741
+ import('./legacysubtitles-50fe640e.js')
7736
7742
  .then(({ default: LegacySubtitles }) => {
7737
7743
  subtitlesContainer = LegacySubtitles(mediaPlayer, autoStart, playbackElement, mediaSources, defaultStyleOpts);
7738
7744
  callback(subtitlesEnabled);
@@ -7741,7 +7747,7 @@ function Subtitles(mediaPlayer, autoStart, playbackElement, defaultStyleOpts, me
7741
7747
  Plugins.interface.onSubtitlesDynamicLoadError();
7742
7748
  });
7743
7749
  } else {
7744
- import('./imscsubtitles-1ade53b5.js')
7750
+ import('./imscsubtitles-eb0982a5.js')
7745
7751
  .then(({ default: IMSCSubtitles }) => {
7746
7752
  subtitlesContainer = IMSCSubtitles(mediaPlayer, autoStart, playbackElement, mediaSources, defaultStyleOpts);
7747
7753
  callback(subtitlesEnabled);
@@ -7863,8 +7869,6 @@ function BigscreenPlayer() {
7863
7869
 
7864
7870
  function mediaStateUpdateCallback(evt) {
7865
7871
  if (evt.timeUpdate) {
7866
- DebugToolInstance.updateElementTime(evt.data.currentTime);
7867
-
7868
7872
  CallCallbacks(timeUpdateCallbacks, {
7869
7873
  currentTime: evt.data.currentTime,
7870
7874
  endOfStream,
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-98c741f8.js';
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-9f5984e2.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-98c741f8.js';
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-9f5984e2.js';
3
3
 
4
4
  function filter(manifest, representationOptions) {
5
5
  const constantFps = representationOptions.constantFps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bigscreen-player",
3
- "version": "8.2.2",
3
+ "version": "8.2.4",
4
4
  "type": "module",
5
5
  "description": "Simplified media playback for bigscreen devices.",
6
6
  "main": "dist/esm/main.js",
@@ -27,7 +27,6 @@
27
27
  },
28
28
  "devDependencies": {
29
29
  "@babel/core": "^7.23.7",
30
- "@babel/eslint-parser": "^7.23.3",
31
30
  "@babel/plugin-transform-runtime": "^7.23.9",
32
31
  "@babel/preset-env": "^7.23.8",
33
32
  "@babel/preset-typescript": "^7.23.3",
@@ -40,14 +39,11 @@
40
39
  "@rollup/plugin-replace": "^5.0.5",
41
40
  "@rollup/plugin-typescript": "^11.1.6",
42
41
  "@types/jest": "^29.5.11",
43
- "@typescript-eslint/eslint-plugin": "^6.18.1",
44
- "@typescript-eslint/parser": "^6.18.1",
45
42
  "babel-jest": "^29.7.0",
46
43
  "better-docs": "^2.7.3",
47
44
  "clean-jsdoc-theme": "^4.2.7",
48
- "eslint": "^8.27.0",
49
- "eslint-plugin-jest": "^27.1.4",
50
- "eslint-plugin-json": "^3.1.0",
45
+ "eslint": "^8.57.0",
46
+ "eslint-plugin-jest": "^27.9.0",
51
47
  "eslint-plugin-sonarjs": "^0.23.0",
52
48
  "eslint-plugin-unicorn": "^50.0.1",
53
49
  "husky": "^8.0.3",
@@ -63,7 +59,8 @@
63
59
  "rollup-plugin-visualizer": "^5.5.2",
64
60
  "ts-jest": "^29.1.1",
65
61
  "ts-node": "^10.9.2",
66
- "typescript": "^5.3.3"
62
+ "typescript": "^5.3.3",
63
+ "typescript-eslint": "^7.2.0"
67
64
  },
68
65
  "dependencies": {
69
66
  "dashjs": "github:bbc/dash.js#smp-v4.7.3-0",