bigscreen-player 10.18.0 → 10.18.2
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.
- package/dist/esm/{embeddedsubtitles-4a1d9b28.js → embeddedsubtitles-7787b82d.js} +1 -1
- package/dist/esm/{imscsubtitles-d7839115.js → imscsubtitles-dbab6019.js} +1 -1
- package/dist/esm/{legacysubtitles-873c21e0.js → legacysubtitles-93c4d399.js} +1 -1
- package/dist/esm/{main-77218006.js → main-9a4a8d0d.js} +32 -6
- package/dist/esm/main.d.ts +4 -3
- package/dist/esm/main.js +1 -1
- package/dist/esm/{msestrategy-0dc4e53f.js → msestrategy-d83b4fae.js} +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { fromXML, generateISD, renderHTML } from 'smp-imsc';
|
|
2
|
-
import { U as Utils, a as DebugTool, P as Plugins, D as DOMHelpers } from './main-
|
|
2
|
+
import { U as Utils, a as DebugTool, P as Plugins, D as DOMHelpers } from './main-9a4a8d0d.js';
|
|
3
3
|
import 'tslib';
|
|
4
4
|
|
|
5
5
|
function EmbeddedSubtitles(mediaPlayer, parentElement, { autoStart = false, defaultStyleOpts = {} } = {}) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { fromXML, generateISD, renderHTML } from 'smp-imsc';
|
|
2
|
-
import { f as findSegmentTemplate, L as LoadUrl, a as DebugTool, P as Plugins, U as Utils, D as DOMHelpers } from './main-
|
|
2
|
+
import { f as findSegmentTemplate, L as LoadUrl, a as DebugTool, P as Plugins, U as Utils, D as DOMHelpers } from './main-9a4a8d0d.js';
|
|
3
3
|
import 'tslib';
|
|
4
4
|
|
|
5
5
|
const SEGMENTS_BUFFER_SIZE = 3;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DOMHelpers, a as DebugTool, P as Plugins, L as LoadUrl, T as TransportControlPosition } from './main-
|
|
1
|
+
import { D as DOMHelpers, a as DebugTool, P as Plugins, L as LoadUrl, T as TransportControlPosition } from './main-9a4a8d0d.js';
|
|
2
2
|
import 'tslib';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -354,6 +354,22 @@ class DebugViewController {
|
|
|
354
354
|
this.dynamicEntries = [];
|
|
355
355
|
this.latestMetricByKey = {};
|
|
356
356
|
}
|
|
357
|
+
isFrameStat(metric) {
|
|
358
|
+
const { kind } = metric;
|
|
359
|
+
return kind === "frames-dropped" || kind === "frames-total";
|
|
360
|
+
}
|
|
361
|
+
mergeFrameStat(entry) {
|
|
362
|
+
const prevEntry = this.latestMetricByKey.frames == null
|
|
363
|
+
? { category: "union", kind: "frames", data: {} }
|
|
364
|
+
: this.latestMetricByKey.frames;
|
|
365
|
+
const { sessionTime, currentElementTime, kind: metricKind, data: metricData } = entry;
|
|
366
|
+
const keyForKind = {
|
|
367
|
+
"frames-dropped": "dropped",
|
|
368
|
+
"frames-total": "total",
|
|
369
|
+
};
|
|
370
|
+
return Object.assign(Object.assign({}, prevEntry), { sessionTime,
|
|
371
|
+
currentElementTime, data: Object.assign(Object.assign({}, prevEntry.data), { [keyForKind[metricKind]]: metricData }) });
|
|
372
|
+
}
|
|
357
373
|
isMediaState(metric) {
|
|
358
374
|
const { kind } = metric;
|
|
359
375
|
const mediaStateMetrics = ["ended", "paused", "playback-rate", "ready-state", "seeking"];
|
|
@@ -417,6 +433,10 @@ class DebugViewController {
|
|
|
417
433
|
const { category, kind } = entry;
|
|
418
434
|
switch (category) {
|
|
419
435
|
case EntryCategory.METRIC:
|
|
436
|
+
if (this.isFrameStat(entry)) {
|
|
437
|
+
this.cacheStaticEntry(this.mergeFrameStat(entry));
|
|
438
|
+
return;
|
|
439
|
+
}
|
|
420
440
|
if (this.isMediaState(entry)) {
|
|
421
441
|
this.cacheStaticEntry(this.mergeMediaState(entry));
|
|
422
442
|
return;
|
|
@@ -554,7 +574,7 @@ class DebugViewController {
|
|
|
554
574
|
return parsedValue == null ? null : { id: kind, key: parsedKey, value: parsedValue };
|
|
555
575
|
}
|
|
556
576
|
serialiseMetric({ kind, data }) {
|
|
557
|
-
var _a, _b, _c, _d, _e, _f;
|
|
577
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
558
578
|
if (typeof data !== "object") {
|
|
559
579
|
return data;
|
|
560
580
|
}
|
|
@@ -603,6 +623,12 @@ class DebugViewController {
|
|
|
603
623
|
const bitratePart = ((((_e = data.audio) !== null && _e !== void 0 ? _e : 0) + ((_f = data.video) !== null && _f !== void 0 ? _f : 0)) / 1000).toFixed(0);
|
|
604
624
|
return `${bitratePart} kbps`;
|
|
605
625
|
}
|
|
626
|
+
if (kind === "frames") {
|
|
627
|
+
if (data.total == null) {
|
|
628
|
+
return null;
|
|
629
|
+
}
|
|
630
|
+
return `${((((_g = data.dropped) !== null && _g !== void 0 ? _g : 0) / data.total) * 100).toFixed(2)}% dropped (${data.dropped}/${data.total})`;
|
|
631
|
+
}
|
|
606
632
|
return data.join(", ");
|
|
607
633
|
}
|
|
608
634
|
render() {
|
|
@@ -5710,7 +5736,7 @@ BasicStrategy.getLiveSupport = () => LiveSupport.SEEKABLE;
|
|
|
5710
5736
|
function StrategyPicker() {
|
|
5711
5737
|
return new Promise((resolve, reject) => {
|
|
5712
5738
|
if (window.bigscreenPlayer.playbackStrategy === PlaybackStrategy.MSE) {
|
|
5713
|
-
return import('./msestrategy-
|
|
5739
|
+
return import('./msestrategy-d83b4fae.js')
|
|
5714
5740
|
.then(({ default: MSEStrategy }) => resolve(MSEStrategy))
|
|
5715
5741
|
.catch((reason) => {
|
|
5716
5742
|
const error = new Error(isError(reason) ? reason.message : undefined);
|
|
@@ -6544,7 +6570,7 @@ const PauseTriggers = {
|
|
|
6544
6570
|
DEVICE: 3,
|
|
6545
6571
|
};
|
|
6546
6572
|
|
|
6547
|
-
var Version = "10.18.
|
|
6573
|
+
var Version = "10.18.2";
|
|
6548
6574
|
|
|
6549
6575
|
/* eslint-disable no-use-before-define */
|
|
6550
6576
|
|
|
@@ -7736,7 +7762,7 @@ function Subtitles(
|
|
|
7736
7762
|
|
|
7737
7763
|
if (available()) {
|
|
7738
7764
|
if (useLegacySubs) {
|
|
7739
|
-
import('./legacysubtitles-
|
|
7765
|
+
import('./legacysubtitles-93c4d399.js')
|
|
7740
7766
|
.then(({ default: LegacySubtitles }) => {
|
|
7741
7767
|
subtitlesContainer = LegacySubtitles(mediaPlayer, playbackElement, mediaSources, {
|
|
7742
7768
|
alwaysOnTop,
|
|
@@ -7750,7 +7776,7 @@ function Subtitles(
|
|
|
7750
7776
|
Plugins.interface.onSubtitlesDynamicLoadError();
|
|
7751
7777
|
});
|
|
7752
7778
|
} else if (embeddedSubs) {
|
|
7753
|
-
import('./embeddedsubtitles-
|
|
7779
|
+
import('./embeddedsubtitles-7787b82d.js')
|
|
7754
7780
|
.then(({ default: EmbeddedSubtitles }) => {
|
|
7755
7781
|
subtitlesContainer = EmbeddedSubtitles(mediaPlayer, playbackElement, {
|
|
7756
7782
|
autoStart,
|
|
@@ -7763,7 +7789,7 @@ function Subtitles(
|
|
|
7763
7789
|
Plugins.interface.onSubtitlesDynamicLoadError();
|
|
7764
7790
|
});
|
|
7765
7791
|
} else {
|
|
7766
|
-
import('./imscsubtitles-
|
|
7792
|
+
import('./imscsubtitles-dbab6019.js')
|
|
7767
7793
|
.then(({ default: IMSCSubtitles }) => {
|
|
7768
7794
|
subtitlesContainer = IMSCSubtitles(mediaPlayer, playbackElement, mediaSources, {
|
|
7769
7795
|
alwaysOnTop,
|
package/dist/esm/main.d.ts
CHANGED
|
@@ -467,6 +467,7 @@ type CurrentLatency = CreateMetric<"current-latency", number>;
|
|
|
467
467
|
type CurrentUrl = CreateMetric<"current-url", string>;
|
|
468
468
|
type Duration = CreateMetric<"duration", number>;
|
|
469
469
|
type FramesDropped = CreateMetric<"frames-dropped", number>;
|
|
470
|
+
type FramesTotal = CreateMetric<"frames-total", number>;
|
|
470
471
|
type InitialPlaybackTime = CreateMetric<"initial-playback-time", [time: number, timeline: Timeline]>;
|
|
471
472
|
type MediaElementEnded = CreateMetric<"ended", HTMLMediaElement["ended"]>;
|
|
472
473
|
type MediaElementPaused = CreateMetric<"paused", HTMLMediaElement["paused"]>;
|
|
@@ -482,7 +483,7 @@ type Version = CreateMetric<"version", string>;
|
|
|
482
483
|
type VideoDownloadQuality = CreateMetric<"video-download-quality", [qualityIndex: number, bitrate: number]>;
|
|
483
484
|
type VideoPlaybackQuality = CreateMetric<"video-playback-quality", [qualityIndex: number, bitrate: number]>;
|
|
484
485
|
type VideoMaxQuality = CreateMetric<"video-max-quality", [qualityIndex: number, bitrate: number]>;
|
|
485
|
-
type Metric = AudioDownloadQuality | AudioMaxQuality | AudioPlaybackQuality | AutoResume | BufferLength | CDNsAvailable | CurrentLatency | CurrentUrl | Duration | FramesDropped | InitialPlaybackTime | MediaElementEnded | MediaElementPaused | MediaElementPlaybackRate | MediaElementReadyState | MediaElementSeeking | PlaybackStrategy | SeekableRange | SubtitleCDNsAvailable | SubtitleCurrentUrl | TargetLatency | Version | VideoDownloadQuality | VideoMaxQuality | VideoPlaybackQuality;
|
|
486
|
+
type Metric = AudioDownloadQuality | AudioMaxQuality | AudioPlaybackQuality | AutoResume | BufferLength | CDNsAvailable | CurrentLatency | CurrentUrl | Duration | FramesDropped | FramesTotal | InitialPlaybackTime | MediaElementEnded | MediaElementPaused | MediaElementPlaybackRate | MediaElementReadyState | MediaElementSeeking | PlaybackStrategy | SeekableRange | SubtitleCDNsAvailable | SubtitleCurrentUrl | TargetLatency | Version | VideoDownloadQuality | VideoMaxQuality | VideoPlaybackQuality;
|
|
486
487
|
type MetricKind = Metric["kind"];
|
|
487
488
|
type MetricForKind<Kind extends MetricKind> = Extract<Metric, {
|
|
488
489
|
kind: Kind;
|
|
@@ -601,8 +602,8 @@ declare const DebugTool: {
|
|
|
601
602
|
}) => void;
|
|
602
603
|
statechange: (value: MediaState) => void;
|
|
603
604
|
warn: (...parts: any[]) => void;
|
|
604
|
-
dynamicMetric: <Kind extends "audio-download-quality" | "audio-max-quality" | "audio-playback-quality" | "auto-resume" | "buffer-length" | "cdns-available" | "current-latency" | "current-url" | "duration" | "frames-dropped" | "initial-playback-time" | "ended" | "paused" | "playback-rate" | "ready-state" | "seeking" | "strategy" | "seekable-range" | "subtitle-cdns-available" | "subtitle-current-url" | "target-latency" | "version" | "video-download-quality" | "video-max-quality" | "video-playback-quality">(kind: Kind, data: MetricForKind<Kind>["data"]) => void;
|
|
605
|
-
staticMetric: <Kind_1 extends "audio-download-quality" | "audio-max-quality" | "audio-playback-quality" | "auto-resume" | "buffer-length" | "cdns-available" | "current-latency" | "current-url" | "duration" | "frames-dropped" | "initial-playback-time" | "ended" | "paused" | "playback-rate" | "ready-state" | "seeking" | "strategy" | "seekable-range" | "subtitle-cdns-available" | "subtitle-current-url" | "target-latency" | "version" | "video-download-quality" | "video-max-quality" | "video-playback-quality">(kind: Kind_1, data: MetricForKind<Kind_1>["data"]) => void;
|
|
605
|
+
dynamicMetric: <Kind extends "audio-download-quality" | "audio-max-quality" | "audio-playback-quality" | "auto-resume" | "buffer-length" | "cdns-available" | "current-latency" | "current-url" | "duration" | "frames-dropped" | "frames-total" | "initial-playback-time" | "ended" | "paused" | "playback-rate" | "ready-state" | "seeking" | "strategy" | "seekable-range" | "subtitle-cdns-available" | "subtitle-current-url" | "target-latency" | "version" | "video-download-quality" | "video-max-quality" | "video-playback-quality">(kind: Kind, data: MetricForKind<Kind>["data"]) => void;
|
|
606
|
+
staticMetric: <Kind_1 extends "audio-download-quality" | "audio-max-quality" | "audio-playback-quality" | "auto-resume" | "buffer-length" | "cdns-available" | "current-latency" | "current-url" | "duration" | "frames-dropped" | "frames-total" | "initial-playback-time" | "ended" | "paused" | "playback-rate" | "ready-state" | "seeking" | "strategy" | "seekable-range" | "subtitle-cdns-available" | "subtitle-current-url" | "target-latency" | "version" | "video-download-quality" | "video-max-quality" | "video-playback-quality">(kind: Kind_1, data: MetricForKind<Kind_1>["data"]) => void;
|
|
606
607
|
hide: () => void;
|
|
607
608
|
show: () => void;
|
|
608
609
|
setRootElement: (element: HTMLElement) => void;
|
package/dist/esm/main.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { B as BigscreenPlayer, a as DebugTool, E as EntryCategory, b as LiveSupport, c as ManifestType, M as MediaKinds, d as MediaState, g as MockBigscreenPlayer, h as PauseTriggers, i as PlaybackStrategy, k as Timeline, j as TransferFormat, T as TransportControlPosition, W as WindowTypes, l as isMessage, m as isMetric, n as isTrace } from './main-
|
|
1
|
+
export { B as BigscreenPlayer, a as DebugTool, E as EntryCategory, b as LiveSupport, c as ManifestType, M as MediaKinds, d as MediaState, g as MockBigscreenPlayer, h as PauseTriggers, i as PlaybackStrategy, k as Timeline, j as TransferFormat, T as TransportControlPosition, W as WindowTypes, l as isMessage, m as isMetric, n as isTrace } from './main-9a4a8d0d.js';
|
|
2
2
|
import 'tslib';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MediaPlayer } from 'dashjs/index';
|
|
2
|
-
import { U as Utils, M as MediaKinds, b as LiveSupport, a as DebugTool, c as ManifestType, P as Plugins, d as MediaState, e as autoResumeAtStartOfRange, D as DOMHelpers } from './main-
|
|
2
|
+
import { U as Utils, M as MediaKinds, b as LiveSupport, a as DebugTool, c as ManifestType, P as Plugins, d as MediaState, e as autoResumeAtStartOfRange, D as DOMHelpers } from './main-9a4a8d0d.js';
|
|
3
3
|
import 'tslib';
|
|
4
4
|
|
|
5
5
|
function filter(manifest, representationOptions) {
|