bigscreen-player 5.7.2 → 6.0.0
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-15051f28.js → imscsubtitles-2c23f7db.js} +1 -1
- package/dist/esm/{legacysubtitles-c12f62b2.js → legacysubtitles-7372c09b.js} +1 -1
- package/dist/esm/{main-2b49fbff.js → main-067f8f93.js} +47 -60
- package/dist/esm/main.js +1 -1
- package/dist/esm/{msestrategy-d14fb443.js → msestrategy-c4b6d760.js} +1 -1
- package/package.json +1 -1
|
@@ -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-067f8f93.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 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-067f8f93.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Safely checks if an attribute exists on an element.
|
|
@@ -283,7 +283,6 @@ const LiveSupport = {
|
|
|
283
283
|
|
|
284
284
|
const PlaybackStrategy = {
|
|
285
285
|
MSE: "msestrategy",
|
|
286
|
-
HYBRID: "hybridstrategy",
|
|
287
286
|
NATIVE: "nativestrategy",
|
|
288
287
|
BASIC: "basicstrategy",
|
|
289
288
|
};
|
|
@@ -5769,35 +5768,18 @@ function BasicStrategy(mediaSources, windowType, mediaKind, playbackElement) {
|
|
|
5769
5768
|
|
|
5770
5769
|
BasicStrategy.getLiveSupport = () => LiveSupport.SEEKABLE;
|
|
5771
5770
|
|
|
5772
|
-
function StrategyPicker(
|
|
5771
|
+
function StrategyPicker() {
|
|
5773
5772
|
return new Promise((resolve, reject) => {
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
if (window.bigscreenPlayer.playbackStrategy === PlaybackStrategy.HYBRID) {
|
|
5777
|
-
if (mseExceptions.indexOf(windowType) !== -1) {
|
|
5778
|
-
return resolve(NativeStrategy)
|
|
5779
|
-
}
|
|
5780
|
-
|
|
5781
|
-
if (isUHD && mseExceptions.indexOf("uhd") !== -1) {
|
|
5782
|
-
return resolve(NativeStrategy)
|
|
5783
|
-
}
|
|
5784
|
-
|
|
5785
|
-
return import('./msestrategy-d14fb443.js')
|
|
5786
|
-
.then(({ default: MSEStrategy }) => resolve(MSEStrategy))
|
|
5787
|
-
.catch(() => {
|
|
5788
|
-
reject({ error: "strategyDynamicLoadError" });
|
|
5789
|
-
})
|
|
5790
|
-
} else if (window.bigscreenPlayer.playbackStrategy === PlaybackStrategy.MSE) {
|
|
5791
|
-
return import('./msestrategy-d14fb443.js')
|
|
5773
|
+
if (window.bigscreenPlayer.playbackStrategy === PlaybackStrategy.MSE) {
|
|
5774
|
+
return import('./msestrategy-c4b6d760.js')
|
|
5792
5775
|
.then(({ default: MSEStrategy }) => resolve(MSEStrategy))
|
|
5793
5776
|
.catch(() => {
|
|
5794
5777
|
reject({ error: "strategyDynamicLoadError" });
|
|
5795
5778
|
})
|
|
5796
5779
|
} else if (window.bigscreenPlayer.playbackStrategy === PlaybackStrategy.BASIC) {
|
|
5797
5780
|
return resolve(BasicStrategy)
|
|
5798
|
-
} else {
|
|
5799
|
-
return resolve(NativeStrategy)
|
|
5800
5781
|
}
|
|
5782
|
+
return resolve(NativeStrategy)
|
|
5801
5783
|
})
|
|
5802
5784
|
}
|
|
5803
5785
|
|
|
@@ -5811,6 +5793,9 @@ function PlayerComponent(
|
|
|
5811
5793
|
) {
|
|
5812
5794
|
const transferFormat = bigscreenPlayerData.media.transferFormat;
|
|
5813
5795
|
|
|
5796
|
+
let _windowType = windowType;
|
|
5797
|
+
let _stateUpdateCallback = stateUpdateCallback;
|
|
5798
|
+
|
|
5814
5799
|
let mediaKind = bigscreenPlayerData.media.kind;
|
|
5815
5800
|
let isInitialPlay = true;
|
|
5816
5801
|
let errorTimeoutID = null;
|
|
@@ -5820,11 +5805,11 @@ function PlayerComponent(
|
|
|
5820
5805
|
let fatalErrorTimeout;
|
|
5821
5806
|
let fatalError;
|
|
5822
5807
|
|
|
5823
|
-
StrategyPicker(
|
|
5808
|
+
StrategyPicker()
|
|
5824
5809
|
.then((strategy) => {
|
|
5825
5810
|
playbackStrategy = strategy(
|
|
5826
5811
|
mediaSources,
|
|
5827
|
-
|
|
5812
|
+
_windowType,
|
|
5828
5813
|
mediaKind,
|
|
5829
5814
|
playbackElement,
|
|
5830
5815
|
bigscreenPlayerData.media.isUHD,
|
|
@@ -5839,8 +5824,8 @@ function PlayerComponent(
|
|
|
5839
5824
|
|
|
5840
5825
|
initialMediaPlay(bigscreenPlayerData.media, bigscreenPlayerData.initialPlaybackTime);
|
|
5841
5826
|
})
|
|
5842
|
-
.catch((
|
|
5843
|
-
errorCallback && errorCallback(
|
|
5827
|
+
.catch((error) => {
|
|
5828
|
+
errorCallback && errorCallback(error);
|
|
5844
5829
|
});
|
|
5845
5830
|
|
|
5846
5831
|
function play() {
|
|
@@ -5851,11 +5836,10 @@ function PlayerComponent(
|
|
|
5851
5836
|
return playbackStrategy && playbackStrategy.isEnded()
|
|
5852
5837
|
}
|
|
5853
5838
|
|
|
5854
|
-
function pause(opts) {
|
|
5855
|
-
opts = opts || {};
|
|
5839
|
+
function pause(opts = {}) {
|
|
5856
5840
|
if (transitions().canBePaused()) {
|
|
5857
|
-
const disableAutoResume =
|
|
5858
|
-
playbackStrategy && playbackStrategy.pause({ disableAutoResume
|
|
5841
|
+
const disableAutoResume = _windowType === WindowTypes.GROWING ? true : opts.disableAutoResume;
|
|
5842
|
+
playbackStrategy && playbackStrategy.pause({ disableAutoResume });
|
|
5859
5843
|
}
|
|
5860
5844
|
}
|
|
5861
5845
|
|
|
@@ -5909,7 +5893,7 @@ function PlayerComponent(
|
|
|
5909
5893
|
return (
|
|
5910
5894
|
window.bigscreenPlayer.playbackStrategy === PlaybackStrategy.NATIVE &&
|
|
5911
5895
|
transferFormat === TransferFormat.HLS &&
|
|
5912
|
-
|
|
5896
|
+
_windowType !== WindowTypes.STATIC &&
|
|
5913
5897
|
getLiveSupport$1() === LiveSupport.RESTARTABLE
|
|
5914
5898
|
)
|
|
5915
5899
|
}
|
|
@@ -5955,18 +5939,22 @@ function PlayerComponent(
|
|
|
5955
5939
|
|
|
5956
5940
|
function eventCallback(mediaState) {
|
|
5957
5941
|
switch (mediaState) {
|
|
5958
|
-
case MediaState.PLAYING:
|
|
5942
|
+
case MediaState.PLAYING: {
|
|
5959
5943
|
onPlaying();
|
|
5960
5944
|
break
|
|
5961
|
-
|
|
5945
|
+
}
|
|
5946
|
+
case MediaState.PAUSED: {
|
|
5962
5947
|
onPaused();
|
|
5963
5948
|
break
|
|
5964
|
-
|
|
5949
|
+
}
|
|
5950
|
+
case MediaState.WAITING: {
|
|
5965
5951
|
onBuffering();
|
|
5966
5952
|
break
|
|
5967
|
-
|
|
5953
|
+
}
|
|
5954
|
+
case MediaState.ENDED: {
|
|
5968
5955
|
onEnded();
|
|
5969
5956
|
break
|
|
5957
|
+
}
|
|
5970
5958
|
}
|
|
5971
5959
|
}
|
|
5972
5960
|
|
|
@@ -6106,7 +6094,7 @@ function PlayerComponent(
|
|
|
6106
6094
|
const evt = new PluginData({
|
|
6107
6095
|
status: PluginEnums.STATUS.DISMISSED,
|
|
6108
6096
|
stateType: PluginEnums.TYPE.BUFFERING,
|
|
6109
|
-
isInitialPlay
|
|
6097
|
+
isInitialPlay,
|
|
6110
6098
|
});
|
|
6111
6099
|
Plugins.interface.onBufferingCleared(evt);
|
|
6112
6100
|
}
|
|
@@ -6128,11 +6116,11 @@ function PlayerComponent(
|
|
|
6128
6116
|
}
|
|
6129
6117
|
|
|
6130
6118
|
function publishMediaStateUpdate(state, opts) {
|
|
6131
|
-
|
|
6119
|
+
const stateUpdateData = {
|
|
6132
6120
|
data: {
|
|
6133
6121
|
currentTime: getCurrentTime(),
|
|
6134
6122
|
seekableRange: getSeekableRange(),
|
|
6135
|
-
state
|
|
6123
|
+
state,
|
|
6136
6124
|
duration: getDuration(),
|
|
6137
6125
|
},
|
|
6138
6126
|
timeUpdate: opts && opts.timeUpdate,
|
|
@@ -6144,9 +6132,8 @@ function PlayerComponent(
|
|
|
6144
6132
|
stateUpdateData.message = opts.message;
|
|
6145
6133
|
}
|
|
6146
6134
|
|
|
6147
|
-
|
|
6135
|
+
_stateUpdateCallback(stateUpdateData);
|
|
6148
6136
|
}
|
|
6149
|
-
|
|
6150
6137
|
function initialMediaPlay(media, startTime) {
|
|
6151
6138
|
mediaMetaData = media;
|
|
6152
6139
|
loadMedia(media.type, startTime);
|
|
@@ -6165,30 +6152,30 @@ function PlayerComponent(
|
|
|
6165
6152
|
playbackStrategy = null;
|
|
6166
6153
|
isInitialPlay = true;
|
|
6167
6154
|
errorTimeoutID = undefined;
|
|
6168
|
-
|
|
6155
|
+
_windowType = undefined;
|
|
6169
6156
|
mediaKind = undefined;
|
|
6170
|
-
|
|
6157
|
+
_stateUpdateCallback = undefined;
|
|
6171
6158
|
mediaMetaData = undefined;
|
|
6172
6159
|
fatalErrorTimeout = undefined;
|
|
6173
6160
|
fatalError = undefined;
|
|
6174
6161
|
}
|
|
6175
6162
|
|
|
6176
6163
|
return {
|
|
6177
|
-
play
|
|
6178
|
-
pause
|
|
6179
|
-
transitions
|
|
6180
|
-
isEnded
|
|
6181
|
-
setPlaybackRate
|
|
6182
|
-
getPlaybackRate
|
|
6183
|
-
setCurrentTime
|
|
6184
|
-
getCurrentTime
|
|
6185
|
-
getDuration
|
|
6186
|
-
getWindowStartTime
|
|
6187
|
-
getWindowEndTime
|
|
6188
|
-
getSeekableRange
|
|
6189
|
-
getPlayerElement
|
|
6190
|
-
isPaused
|
|
6191
|
-
tearDown
|
|
6164
|
+
play,
|
|
6165
|
+
pause,
|
|
6166
|
+
transitions,
|
|
6167
|
+
isEnded,
|
|
6168
|
+
setPlaybackRate,
|
|
6169
|
+
getPlaybackRate,
|
|
6170
|
+
setCurrentTime,
|
|
6171
|
+
getCurrentTime,
|
|
6172
|
+
getDuration,
|
|
6173
|
+
getWindowStartTime,
|
|
6174
|
+
getWindowEndTime,
|
|
6175
|
+
getSeekableRange,
|
|
6176
|
+
getPlayerElement,
|
|
6177
|
+
isPaused,
|
|
6178
|
+
tearDown,
|
|
6192
6179
|
}
|
|
6193
6180
|
}
|
|
6194
6181
|
|
|
@@ -6230,7 +6217,7 @@ function CallCallbacks(callbacks, data) {
|
|
|
6230
6217
|
}
|
|
6231
6218
|
}
|
|
6232
6219
|
|
|
6233
|
-
var version = "
|
|
6220
|
+
var version = "6.0.0";
|
|
6234
6221
|
|
|
6235
6222
|
var sourceList;
|
|
6236
6223
|
var source;
|
|
@@ -7604,7 +7591,7 @@ function Subtitles(mediaPlayer, autoStart, playbackElement, defaultStyleOpts, me
|
|
|
7604
7591
|
let subtitlesContainer;
|
|
7605
7592
|
|
|
7606
7593
|
if (useLegacySubs && available()) {
|
|
7607
|
-
import('./legacysubtitles-
|
|
7594
|
+
import('./legacysubtitles-7372c09b.js')
|
|
7608
7595
|
.then(({ default: LegacySubtitles }) => {
|
|
7609
7596
|
subtitlesContainer = LegacySubtitles(mediaPlayer, autoStart, playbackElement, mediaSources, defaultStyleOpts);
|
|
7610
7597
|
callback(subtitlesEnabled);
|
|
@@ -7622,7 +7609,7 @@ function Subtitles(mediaPlayer, autoStart, playbackElement, defaultStyleOpts, me
|
|
|
7622
7609
|
*/
|
|
7623
7610
|
Promise.resolve().then(() => callback(subtitlesEnabled));
|
|
7624
7611
|
} else {
|
|
7625
|
-
import('./imscsubtitles-
|
|
7612
|
+
import('./imscsubtitles-2c23f7db.js')
|
|
7626
7613
|
.then(({ default: IMSCSubtitles }) => {
|
|
7627
7614
|
subtitlesContainer = IMSCSubtitles(mediaPlayer, autoStart, playbackElement, mediaSources, defaultStyleOpts);
|
|
7628
7615
|
callback(subtitlesEnabled);
|
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-
|
|
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-067f8f93.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as Utils, D as DOMHelpers, W as WindowTypes, b as LiveSupport, M as MediaState, a as DebugTool, P as Plugins, c as MediaKinds, d as TimeUtils, e as DynamicWindowUtils } from './main-
|
|
1
|
+
import { U as Utils, D as DOMHelpers, W as WindowTypes, b as LiveSupport, M as MediaState, a as DebugTool, P as Plugins, c as MediaKinds, d as TimeUtils, e as DynamicWindowUtils } from './main-067f8f93.js';
|
|
2
2
|
import { MediaPlayer } from 'dashjs/index_mediaplayerOnly';
|
|
3
3
|
|
|
4
4
|
function filter(manifest, representationOptions) {
|