bigscreen-player 10.0.0 → 10.0.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/{imscsubtitles-31c61460.js → imscsubtitles-4fc7ce45.js} +1 -1
- package/dist/esm/{legacysubtitles-56299e69.js → legacysubtitles-19fdb8d3.js} +1 -1
- package/dist/esm/{main-02c1cf26.js → main-077c124a.js} +9 -10
- package/dist/esm/main.d.ts +3 -63
- package/dist/esm/main.js +1 -1
- package/dist/esm/{msestrategy-e1f877f1.js → msestrategy-ea1348d6.js} +9 -5
- package/package.json +3 -2
|
@@ -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-077c124a.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-077c124a.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-ea1348d6.js')
|
|
5641
5641
|
.then(({ default: MSEStrategy }) => resolve(MSEStrategy))
|
|
5642
5642
|
.catch((reason) => {
|
|
5643
5643
|
const error = new Error(isError(reason) ? reason.message : undefined);
|
|
@@ -5946,8 +5946,8 @@ var Plugins = {
|
|
|
5946
5946
|
};
|
|
5947
5947
|
|
|
5948
5948
|
/**
|
|
5949
|
-
* @
|
|
5950
|
-
* @
|
|
5949
|
+
* @import { InitData } from './types.d.ts'
|
|
5950
|
+
* @import { MediaSources } from './mediasources'
|
|
5951
5951
|
*
|
|
5952
5952
|
* @typedef {{
|
|
5953
5953
|
* data: {
|
|
@@ -6392,7 +6392,7 @@ const PauseTriggers = {
|
|
|
6392
6392
|
DEVICE: 3,
|
|
6393
6393
|
};
|
|
6394
6394
|
|
|
6395
|
-
var Version = "10.0.
|
|
6395
|
+
var Version = "10.0.2";
|
|
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-19fdb8d3.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-4fc7ce45.js')
|
|
7583
7583
|
.then(({ default: IMSCSubtitles }) => {
|
|
7584
7584
|
subtitlesContainer = IMSCSubtitles(mediaPlayer, autoStart, playbackElement, mediaSources, defaultStyleOpts);
|
|
7585
7585
|
callback(subtitlesEnabled);
|
|
@@ -7683,10 +7683,9 @@ const Timeline = {
|
|
|
7683
7683
|
*/
|
|
7684
7684
|
|
|
7685
7685
|
/**
|
|
7686
|
-
* @
|
|
7687
|
-
*
|
|
7688
|
-
*
|
|
7689
|
-
* @typedef {import('./types.ts').PlaybackTime} PlaybackTime
|
|
7686
|
+
* @import {
|
|
7687
|
+
* InitCallbacks, InitData, SubtitlesCustomisationOptions,PlaybackTime
|
|
7688
|
+
* } from './types.ts'
|
|
7690
7689
|
*/
|
|
7691
7690
|
|
|
7692
7691
|
function BigscreenPlayer() {
|
package/dist/esm/main.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { MediaPlayerSettingClass } from 'dashjs';
|
|
2
|
-
|
|
3
1
|
declare const Timeline: {
|
|
4
2
|
readonly AVAILABILITY_TIME: "availabilityTime";
|
|
5
3
|
readonly MEDIA_SAMPLE_TIME: "mediaSampleTime";
|
|
@@ -7,70 +5,12 @@ declare const Timeline: {
|
|
|
7
5
|
};
|
|
8
6
|
type Timeline = (typeof Timeline)[keyof typeof Timeline];
|
|
9
7
|
|
|
10
|
-
type Connection = {
|
|
11
|
-
cdn: string;
|
|
12
|
-
url: string;
|
|
13
|
-
};
|
|
14
|
-
type CaptionsConnection = Connection & {
|
|
15
|
-
segmentLength: number;
|
|
16
|
-
};
|
|
17
|
-
type Settings = MediaPlayerSettingClass & {
|
|
18
|
-
failoverResetTime: number;
|
|
19
|
-
failoverSort: (sources: Connection[]) => Connection[];
|
|
20
|
-
streaming: {
|
|
21
|
-
seekDurationPadding: number;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
type SubtitlesCustomisationOptions$1 = Partial<{
|
|
25
|
-
/** CSS background-color string or hex string */
|
|
26
|
-
backgroundColor: string;
|
|
27
|
-
/** CSS font-family string */
|
|
28
|
-
fontFamily: string;
|
|
29
|
-
/** lineHeight multiplier to authored subtitles */
|
|
30
|
-
lineHeight: number;
|
|
31
|
-
/** size multiplier to authored subtitles */
|
|
32
|
-
size: number;
|
|
33
|
-
}>;
|
|
34
|
-
type PlaybackTime = {
|
|
35
|
-
seconds: number;
|
|
36
|
-
timeline: Timeline;
|
|
37
|
-
};
|
|
38
|
-
type MediaDescriptor = {
|
|
39
|
-
kind: "audio" | "video";
|
|
40
|
-
/** f.ex. 'video/mp4' */
|
|
41
|
-
mimeType: string;
|
|
42
|
-
/** source type. f.ex. 'application/dash+xml' */
|
|
43
|
-
type: string;
|
|
44
|
-
urls: Connection[];
|
|
45
|
-
captions?: CaptionsConnection[];
|
|
46
|
-
audioDescribed?: Connection[];
|
|
47
|
-
/** Location for a captions file */
|
|
48
|
-
captionsUrl?: string;
|
|
49
|
-
playerSettings?: Partial<Settings>;
|
|
50
|
-
subtitlesCustomisation?: SubtitlesCustomisationOptions$1;
|
|
51
|
-
subtitlesRequestTimeout?: number;
|
|
52
|
-
};
|
|
53
|
-
type InitData$1 = {
|
|
54
|
-
media: MediaDescriptor;
|
|
55
|
-
enableSubtitles?: boolean;
|
|
56
|
-
enableAudioDescribed?: boolean;
|
|
57
|
-
initialPlaybackTime?: number | PlaybackTime;
|
|
58
|
-
};
|
|
59
|
-
type InitCallbacks$1 = {
|
|
60
|
-
onError: () => void;
|
|
61
|
-
onSuccess: () => void;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
8
|
declare const _default$1: "__VERSION__";
|
|
65
9
|
|
|
66
|
-
type InitData = InitData$1;
|
|
67
|
-
type InitCallbacks = InitCallbacks$1;
|
|
68
|
-
type SubtitlesCustomisationOptions = SubtitlesCustomisationOptions$1;
|
|
69
10
|
/**
|
|
70
|
-
* @
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
* @typedef {import('./types.ts').PlaybackTime} PlaybackTime
|
|
11
|
+
* @import {
|
|
12
|
+
* InitCallbacks, InitData, SubtitlesCustomisationOptions,PlaybackTime
|
|
13
|
+
* } from './types.ts'
|
|
74
14
|
*/
|
|
75
15
|
declare function BigscreenPlayer(): {
|
|
76
16
|
/**
|
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-077c124a.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-077c124a.js';
|
|
3
3
|
import 'tslib';
|
|
4
4
|
|
|
5
5
|
function filter(manifest, representationOptions) {
|
|
@@ -597,7 +597,9 @@ function MSEStrategy(
|
|
|
597
597
|
if (mediaPlayer) {
|
|
598
598
|
modifySource(cached.currentTime);
|
|
599
599
|
} else {
|
|
600
|
-
|
|
600
|
+
if (typeof presentationTimeInSeconds === "number" && isFinite(presentationTimeInSeconds)) {
|
|
601
|
+
cached.currentTime = presentationTimeInSeconds;
|
|
602
|
+
}
|
|
601
603
|
setUpMediaElement(playbackElement);
|
|
602
604
|
setUpMediaPlayer(presentationTimeInSeconds);
|
|
603
605
|
setUpMediaListeners();
|
|
@@ -736,7 +738,7 @@ function MSEStrategy(
|
|
|
736
738
|
const duration = mediaPlayer && mediaPlayer.isReady() && mediaPlayer.duration();
|
|
737
739
|
|
|
738
740
|
// If duration is a number, return that, else return cached value (default 0)
|
|
739
|
-
if (typeof duration === "number" &&
|
|
741
|
+
if (typeof duration === "number" && isFinite(duration)) {
|
|
740
742
|
cached.duration = duration;
|
|
741
743
|
return duration
|
|
742
744
|
}
|
|
@@ -746,7 +748,7 @@ function MSEStrategy(
|
|
|
746
748
|
function getCurrentTime() {
|
|
747
749
|
const currentTime = mediaElement?.currentTime;
|
|
748
750
|
|
|
749
|
-
if (currentTime &&
|
|
751
|
+
if (typeof currentTime === "number" && isFinite(currentTime)) {
|
|
750
752
|
cached.currentTime = currentTime;
|
|
751
753
|
return currentTime
|
|
752
754
|
}
|
|
@@ -754,7 +756,9 @@ function MSEStrategy(
|
|
|
754
756
|
}
|
|
755
757
|
|
|
756
758
|
function refreshManifestBeforeSeek(presentationTimeInSeconds) {
|
|
757
|
-
|
|
759
|
+
if (typeof presentationTimeInSeconds === "number" && isFinite(presentationTimeInSeconds)) {
|
|
760
|
+
cached.currentTime = presentationTimeInSeconds;
|
|
761
|
+
}
|
|
758
762
|
|
|
759
763
|
mediaPlayer.refreshManifest((manifest) => {
|
|
760
764
|
const mediaPresentationDuration = manifest?.mediaPresentationDuration;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bigscreen-player",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Simplified media playback for bigscreen devices.",
|
|
6
6
|
"main": "dist/esm/main.js",
|
|
@@ -50,7 +50,8 @@
|
|
|
50
50
|
"husky": "^8.0.3",
|
|
51
51
|
"jest": "^29.5.0",
|
|
52
52
|
"jest-environment-jsdom": "^29.5.0",
|
|
53
|
-
"jsdoc": "^4.0.
|
|
53
|
+
"jsdoc": "^4.0.4",
|
|
54
|
+
"jsdoc-plugin-typescript": "^3.2.0",
|
|
54
55
|
"prettier": "^3.1.1",
|
|
55
56
|
"rollup": "^3.29.4",
|
|
56
57
|
"rollup-plugin-dts": "^6.1.0",
|