bigscreen-player 10.1.2 → 10.2.1
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/{imscsubtitles-18bd2c88.js → imscsubtitles-c997cc7e.js} +1 -1
- package/dist/esm/{legacysubtitles-0d00ceea.js → legacysubtitles-5fb37a67.js} +1 -1
- package/dist/esm/{main-a8416c78.js → main-9d9ca786.js} +4 -4
- package/dist/esm/main.d.ts +5 -3
- package/dist/esm/main.js +1 -1
- package/dist/esm/{msestrategy-5b96e4ba.js → msestrategy-41279c7b.js} +10 -1
- package/package.json +4 -5
|
@@ -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-9d9ca786.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-9d9ca786.js';
|
|
2
2
|
import 'tslib';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -5637,7 +5637,7 @@ BasicStrategy.getLiveSupport = () => LiveSupport.SEEKABLE;
|
|
|
5637
5637
|
function StrategyPicker() {
|
|
5638
5638
|
return new Promise((resolve, reject) => {
|
|
5639
5639
|
if (window.bigscreenPlayer.playbackStrategy === PlaybackStrategy.MSE) {
|
|
5640
|
-
return import('./msestrategy-
|
|
5640
|
+
return import('./msestrategy-41279c7b.js')
|
|
5641
5641
|
.then(({ default: MSEStrategy }) => resolve(MSEStrategy))
|
|
5642
5642
|
.catch((reason) => {
|
|
5643
5643
|
const error = new Error(isError(reason) ? reason.message : undefined);
|
|
@@ -6392,7 +6392,7 @@ const PauseTriggers = {
|
|
|
6392
6392
|
DEVICE: 3,
|
|
6393
6393
|
};
|
|
6394
6394
|
|
|
6395
|
-
var Version = "10.1
|
|
6395
|
+
var Version = "10.2.1";
|
|
6396
6396
|
|
|
6397
6397
|
/* eslint-disable no-use-before-define */
|
|
6398
6398
|
|
|
@@ -7570,7 +7570,7 @@ function Subtitles(mediaPlayer, autoStart, playbackElement, defaultStyleOpts, me
|
|
|
7570
7570
|
|
|
7571
7571
|
if (available()) {
|
|
7572
7572
|
if (useLegacySubs) {
|
|
7573
|
-
import('./legacysubtitles-
|
|
7573
|
+
import('./legacysubtitles-5fb37a67.js')
|
|
7574
7574
|
.then(({ default: LegacySubtitles }) => {
|
|
7575
7575
|
subtitlesContainer = LegacySubtitles(mediaPlayer, autoStart, playbackElement, mediaSources, defaultStyleOpts);
|
|
7576
7576
|
callback(subtitlesEnabled);
|
|
@@ -7579,7 +7579,7 @@ function Subtitles(mediaPlayer, autoStart, playbackElement, defaultStyleOpts, me
|
|
|
7579
7579
|
Plugins.interface.onSubtitlesDynamicLoadError();
|
|
7580
7580
|
});
|
|
7581
7581
|
} else {
|
|
7582
|
-
import('./imscsubtitles-
|
|
7582
|
+
import('./imscsubtitles-c997cc7e.js')
|
|
7583
7583
|
.then(({ default: IMSCSubtitles }) => {
|
|
7584
7584
|
subtitlesContainer = IMSCSubtitles(mediaPlayer, autoStart, playbackElement, mediaSources, defaultStyleOpts);
|
|
7585
7585
|
callback(subtitlesEnabled);
|
package/dist/esm/main.d.ts
CHANGED
|
@@ -453,6 +453,7 @@ type AutoResume = CreateMetric<"auto-resume", number>;
|
|
|
453
453
|
type BitRate = CreateMetric<"bitrate", number>;
|
|
454
454
|
type BufferLength = CreateMetric<"buffer-length", number>;
|
|
455
455
|
type CDNsAvailable = CreateMetric<"cdns-available", string[]>;
|
|
456
|
+
type CurrentLatency = CreateMetric<"current-latency", number>;
|
|
456
457
|
type CurrentUrl = CreateMetric<"current-url", string>;
|
|
457
458
|
type Duration = CreateMetric<"duration", number>;
|
|
458
459
|
type FramesDropped = CreateMetric<"frames-dropped", number>;
|
|
@@ -468,8 +469,9 @@ type RepresentationVideo = CreateMetric<"representation-video", [qualityIndex: n
|
|
|
468
469
|
type SeekableRange = CreateMetric<"seekable-range", [start: number, end: number]>;
|
|
469
470
|
type SubtitleCDNsAvailable = CreateMetric<"subtitle-cdns-available", string[]>;
|
|
470
471
|
type SubtitleCurrentUrl = CreateMetric<"subtitle-current-url", string>;
|
|
472
|
+
type TargetLatency = CreateMetric<"target-latency", number>;
|
|
471
473
|
type Version = CreateMetric<"version", string>;
|
|
472
|
-
type Metric = AutoResume | BitRate | BufferLength | CDNsAvailable | CurrentUrl | Duration | FramesDropped | InitialPlaybackTime | MediaElementEnded | MediaElementPaused | MediaElementPlaybackRate | MediaElementReadyState | MediaElementSeeking | PlaybackStrategy | RepresentationAudio | RepresentationVideo | SeekableRange | SubtitleCDNsAvailable | SubtitleCurrentUrl | Version;
|
|
474
|
+
type Metric = AutoResume | BitRate | BufferLength | CDNsAvailable | CurrentLatency | CurrentUrl | Duration | FramesDropped | InitialPlaybackTime | MediaElementEnded | MediaElementPaused | MediaElementPlaybackRate | MediaElementReadyState | MediaElementSeeking | PlaybackStrategy | RepresentationAudio | RepresentationVideo | SeekableRange | SubtitleCDNsAvailable | SubtitleCurrentUrl | TargetLatency | Version;
|
|
473
475
|
type MetricKind = Metric["kind"];
|
|
474
476
|
type MetricForKind<Kind extends MetricKind> = Extract<Metric, {
|
|
475
477
|
kind: Kind;
|
|
@@ -588,8 +590,8 @@ declare const DebugTool: {
|
|
|
588
590
|
}) => void;
|
|
589
591
|
statechange: (value: MediaState) => void;
|
|
590
592
|
warn: (...parts: any[]) => void;
|
|
591
|
-
dynamicMetric: <Kind extends "auto-resume" | "bitrate" | "buffer-length" | "cdns-available" | "current-url" | "duration" | "frames-dropped" | "initial-playback-time" | "ended" | "paused" | "playback-rate" | "ready-state" | "seeking" | "strategy" | "representation-audio" | "representation-video" | "seekable-range" | "subtitle-cdns-available" | "subtitle-current-url" | "version">(kind: Kind, data: MetricForKind<Kind>["data"]) => void;
|
|
592
|
-
staticMetric: <Kind_1 extends "auto-resume" | "bitrate" | "buffer-length" | "cdns-available" | "current-url" | "duration" | "frames-dropped" | "initial-playback-time" | "ended" | "paused" | "playback-rate" | "ready-state" | "seeking" | "strategy" | "representation-audio" | "representation-video" | "seekable-range" | "subtitle-cdns-available" | "subtitle-current-url" | "version">(kind: Kind_1, data: MetricForKind<Kind_1>["data"]) => void;
|
|
593
|
+
dynamicMetric: <Kind extends "auto-resume" | "bitrate" | "buffer-length" | "cdns-available" | "current-latency" | "current-url" | "duration" | "frames-dropped" | "initial-playback-time" | "ended" | "paused" | "playback-rate" | "ready-state" | "seeking" | "strategy" | "representation-audio" | "representation-video" | "seekable-range" | "subtitle-cdns-available" | "subtitle-current-url" | "target-latency" | "version">(kind: Kind, data: MetricForKind<Kind>["data"]) => void;
|
|
594
|
+
staticMetric: <Kind_1 extends "auto-resume" | "bitrate" | "buffer-length" | "cdns-available" | "current-latency" | "current-url" | "duration" | "frames-dropped" | "initial-playback-time" | "ended" | "paused" | "playback-rate" | "ready-state" | "seeking" | "strategy" | "representation-audio" | "representation-video" | "seekable-range" | "subtitle-cdns-available" | "subtitle-current-url" | "target-latency" | "version">(kind: Kind_1, data: MetricForKind<Kind_1>["data"]) => void;
|
|
593
595
|
hide: () => void;
|
|
594
596
|
show: () => void;
|
|
595
597
|
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-9d9ca786.js';
|
|
2
2
|
import 'tslib';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MediaPlayer } from 'dashjs/index_mediaplayerOnly';
|
|
2
|
-
import { U as Utils, b as LiveSupport, M as MediaKinds, a as DebugTool, c as ManifestType, d as MediaState, P as Plugins, e as autoResumeAtStartOfRange, D as DOMHelpers } from './main-
|
|
2
|
+
import { U as Utils, b as LiveSupport, M as MediaKinds, a as DebugTool, c as ManifestType, d as MediaState, P as Plugins, e as autoResumeAtStartOfRange, D as DOMHelpers } from './main-9d9ca786.js';
|
|
3
3
|
import 'tslib';
|
|
4
4
|
|
|
5
5
|
function filter(manifest, representationOptions) {
|
|
@@ -305,6 +305,11 @@ function MSEStrategy(
|
|
|
305
305
|
function onTimeUpdate() {
|
|
306
306
|
DebugTool.updateElementTime(mediaElement.currentTime);
|
|
307
307
|
|
|
308
|
+
if (!isNaN(mediaPlayer.getCurrentLiveLatency())) {
|
|
309
|
+
DebugTool.staticMetric("current-latency", mediaPlayer.getCurrentLiveLatency());
|
|
310
|
+
DebugTool.staticMetric("target-latency", mediaPlayer.getTargetLiveDelay());
|
|
311
|
+
}
|
|
312
|
+
|
|
308
313
|
const currentPresentationTimeInSeconds = mediaElement.currentTime;
|
|
309
314
|
|
|
310
315
|
// Note: Multiple consecutive CDN failover logic
|
|
@@ -845,12 +850,16 @@ function MSEStrategy(
|
|
|
845
850
|
const audioTracks = mediaPlayer.getTracksFor("audio");
|
|
846
851
|
const mainTrack = audioTracks.find((track) => track.roles.includes("main"));
|
|
847
852
|
mediaPlayer.setCurrentTrack(mainTrack);
|
|
853
|
+
|
|
854
|
+
if (isPaused()) mediaPlayer.play();
|
|
848
855
|
}
|
|
849
856
|
|
|
850
857
|
function setAudioDescribedOn() {
|
|
851
858
|
const ADTrack = getAudioDescribedTrack();
|
|
852
859
|
if (ADTrack) {
|
|
853
860
|
mediaPlayer.setCurrentTrack(ADTrack);
|
|
861
|
+
|
|
862
|
+
if (isPaused()) mediaPlayer.play();
|
|
854
863
|
}
|
|
855
864
|
}
|
|
856
865
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bigscreen-player",
|
|
3
|
-
"version": "10.1
|
|
3
|
+
"version": "10.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Simplified media playback for bigscreen devices.",
|
|
6
6
|
"main": "dist/esm/main.js",
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
"docs": "jsdoc -c jsdoc.conf.json",
|
|
18
18
|
"build": "npm run build:clean && npm run build:bundle && npm run build:tmp",
|
|
19
19
|
"build:clean": "rm -rf dist/*",
|
|
20
|
-
"build:bundle": "
|
|
20
|
+
"build:bundle": "rollup --config rollup.config.js",
|
|
21
21
|
"build:tmp": "rm -r dist/esm/__tmp",
|
|
22
|
-
"watch": "
|
|
23
|
-
"start": "
|
|
22
|
+
"watch": "rollup --watch --config rollup.config.js",
|
|
23
|
+
"start": "rollup --watch --config rollup.dev.config.js",
|
|
24
24
|
"test": "jest",
|
|
25
25
|
"coverage": "jest --coverage",
|
|
26
26
|
"lint": "eslint ."
|
|
@@ -42,7 +42,6 @@
|
|
|
42
42
|
"babel-jest": "^29.7.0",
|
|
43
43
|
"better-docs": "^2.7.3",
|
|
44
44
|
"clean-jsdoc-theme": "^4.2.7",
|
|
45
|
-
"cross-env": "^7.0.3",
|
|
46
45
|
"eslint": "^8.57.0",
|
|
47
46
|
"eslint-plugin-jest": "^27.9.0",
|
|
48
47
|
"eslint-plugin-sonarjs": "^0.23.0",
|