@ix_waterford/lib 1.0.2 → 1.0.3
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/README.md +5 -22
- package/dist/static/js/async/reactPlayerDash.js +104 -4
- package/dist/static/js/async/reactPlayerDash.js.map +1 -1
- package/dist/static/js/async/reactPlayerHls.js +5 -5
- package/dist/static/js/async/reactPlayerMux.js +323 -323
- package/dist/static/js/async/reactPlayerPreview.js +2 -2
- package/dist/static/js/async/reactPlayerPreview.js.map +1 -1
- package/dist/static/js/async/reactPlayerSpotify.js +2 -2
- package/dist/static/js/async/reactPlayerTiktok.js +2 -2
- package/dist/static/js/async/reactPlayerTwitch.js +2 -2
- package/dist/static/js/async/reactPlayerVimeo.js +4 -4
- package/dist/static/js/async/reactPlayerWistia.js +3 -3
- package/dist/static/js/async/reactPlayerYouTube.js +6 -2
- package/dist/static/js/async/reactPlayerYouTube.js.map +1 -1
- package/dist/static/js/async/vendors-node_modules_custom-media-element_dist_custom-media-element_js-node_modules_media-tra-835023.js +34 -34
- package/dist/static/js/async/vendors-node_modules_hls_js_dist_hls_mjs.js +60 -28
- package/dist/static/js/async/vendors-node_modules_hls_js_dist_hls_mjs.js.map +1 -1
- package/dist/static/js/index.js +604 -1038
- package/dist/static/js/index.js.map +1 -1
- package/dist/static/js/vendors-node_modules_dayjs_plugin_utc_js-node_modules_react-color_es_index_js-node_modules_mu-c151eb.js +4087 -4017
- package/dist/static/js/vendors-node_modules_dayjs_plugin_utc_js-node_modules_react-color_es_index_js-node_modules_mu-c151eb.js.map +1 -1
- package/dist/types/assets/index.d.ts +1 -1
- package/dist/types/assets/index.d.ts.map +1 -1
- package/dist/types/components/index.d.ts +1 -1
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/index.d.ts +4 -4
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +55 -4
|
@@ -576,7 +576,7 @@ function enableLogs(debugConfig, context, id) {
|
|
|
576
576
|
// Some browsers don't allow to use bind on console object anyway
|
|
577
577
|
// fallback to default if needed
|
|
578
578
|
try {
|
|
579
|
-
newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.6.
|
|
579
|
+
newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.6.15"}`);
|
|
580
580
|
} catch (e) {
|
|
581
581
|
/* log fn threw an exception. All logger methods are no-ops. */
|
|
582
582
|
return createLogger();
|
|
@@ -5029,11 +5029,7 @@ class FragmentTracker {
|
|
|
5029
5029
|
});
|
|
5030
5030
|
fragmentEntity.loaded = null;
|
|
5031
5031
|
if (Object.keys(fragmentEntity.range).length) {
|
|
5032
|
-
fragmentEntity
|
|
5033
|
-
const endList = fragmentEntity.body.endList = frag.endList || fragmentEntity.body.endList;
|
|
5034
|
-
if (endList) {
|
|
5035
|
-
this.endListFragments[fragmentEntity.body.type] = fragmentEntity;
|
|
5036
|
-
}
|
|
5032
|
+
this.bufferedEnd(fragmentEntity, frag);
|
|
5037
5033
|
if (!isPartial(fragmentEntity)) {
|
|
5038
5034
|
// Remove older fragment parts from lookup after frag is tracked as buffered
|
|
5039
5035
|
this.removeParts(frag.sn - 1, frag.type);
|
|
@@ -5043,6 +5039,13 @@ class FragmentTracker {
|
|
|
5043
5039
|
this.removeFragment(fragmentEntity.body);
|
|
5044
5040
|
}
|
|
5045
5041
|
}
|
|
5042
|
+
bufferedEnd(fragmentEntity, frag) {
|
|
5043
|
+
fragmentEntity.buffered = true;
|
|
5044
|
+
const endList = fragmentEntity.body.endList = frag.endList || fragmentEntity.body.endList;
|
|
5045
|
+
if (endList) {
|
|
5046
|
+
this.endListFragments[fragmentEntity.body.type] = fragmentEntity;
|
|
5047
|
+
}
|
|
5048
|
+
}
|
|
5046
5049
|
removeParts(snToKeep, levelType) {
|
|
5047
5050
|
const activeParts = this.activePartLists[levelType];
|
|
5048
5051
|
if (!activeParts) {
|
|
@@ -5067,7 +5070,7 @@ class FragmentTracker {
|
|
|
5067
5070
|
}
|
|
5068
5071
|
if (fragmentEntity) {
|
|
5069
5072
|
fragmentEntity.loaded = null;
|
|
5070
|
-
fragmentEntity
|
|
5073
|
+
this.bufferedEnd(fragmentEntity, frag);
|
|
5071
5074
|
}
|
|
5072
5075
|
}
|
|
5073
5076
|
getBufferedTimes(fragment, part, partial, timeRange) {
|
|
@@ -7116,6 +7119,14 @@ class LevelKey {
|
|
|
7116
7119
|
static setKeyIdForUri(uri, keyId) {
|
|
7117
7120
|
keyUriToKeyIdMap[uri] = keyId;
|
|
7118
7121
|
}
|
|
7122
|
+
static addKeyIdForUri(uri) {
|
|
7123
|
+
const val = Object.keys(keyUriToKeyIdMap).length % Number.MAX_SAFE_INTEGER;
|
|
7124
|
+
const keyId = new Uint8Array(16);
|
|
7125
|
+
const dv = new DataView(keyId.buffer, 12, 4); // Just set the last 4 bytes
|
|
7126
|
+
dv.setUint32(0, val);
|
|
7127
|
+
keyUriToKeyIdMap[uri] = keyId;
|
|
7128
|
+
return keyId;
|
|
7129
|
+
}
|
|
7119
7130
|
constructor(method, uri, format, formatversions = [1], iv = null, keyId) {
|
|
7120
7131
|
this.uri = void 0;
|
|
7121
7132
|
this.method = void 0;
|
|
@@ -9280,7 +9291,7 @@ class BaseStreamController extends TaskLoop {
|
|
|
9280
9291
|
this.state = State.FRAG_LOADING;
|
|
9281
9292
|
|
|
9282
9293
|
// Load key before streaming fragment data
|
|
9283
|
-
const dataOnProgress = this.config.progressive;
|
|
9294
|
+
const dataOnProgress = this.config.progressive && frag.type !== PlaylistLevelType.SUBTITLE;
|
|
9284
9295
|
let result;
|
|
9285
9296
|
if (dataOnProgress && keyLoadingPromise) {
|
|
9286
9297
|
result = keyLoadingPromise.then(keyLoadedData => {
|
|
@@ -10128,11 +10139,12 @@ class BaseStreamController extends TaskLoop {
|
|
|
10128
10139
|
}, false);
|
|
10129
10140
|
if (!parsed) {
|
|
10130
10141
|
var _this$transmuxer;
|
|
10131
|
-
|
|
10132
|
-
|
|
10142
|
+
const mediaNotFound = ((_this$transmuxer = this.transmuxer) == null ? void 0 : _this$transmuxer.error) === null;
|
|
10143
|
+
if (level.fragmentError === 0 || mediaNotFound && (level.fragmentError < 2 || frag.endList)) {
|
|
10144
|
+
// Mark and track the odd (or last) empty segment as a gap to avoid reloading
|
|
10133
10145
|
this.treatAsGap(frag, level);
|
|
10134
10146
|
}
|
|
10135
|
-
if (
|
|
10147
|
+
if (mediaNotFound) {
|
|
10136
10148
|
const error = new Error(`Found no media in fragment ${frag.sn} of ${this.playlistLabel()} ${frag.level} resetting transmuxer to fallback to playlist timing`);
|
|
10137
10149
|
this.warn(error.message);
|
|
10138
10150
|
this.hls.trigger(Events.ERROR, {
|
|
@@ -10593,7 +10605,7 @@ function requireEventemitter3 () {
|
|
|
10593
10605
|
var eventemitter3Exports = requireEventemitter3();
|
|
10594
10606
|
var EventEmitter = /*@__PURE__*/getDefaultExportFromCjs(eventemitter3Exports);
|
|
10595
10607
|
|
|
10596
|
-
const version = "1.6.
|
|
10608
|
+
const version = "1.6.15";
|
|
10597
10609
|
|
|
10598
10610
|
// ensure the worker ends up in the bundle
|
|
10599
10611
|
// If the worker should not be included this gets aliased to empty.js
|
|
@@ -15771,7 +15783,7 @@ class MP4Remuxer extends Logger {
|
|
|
15771
15783
|
// Clear the track samples. This also clears the samples array in the demuxer, since the reference is shared
|
|
15772
15784
|
track.samples = [];
|
|
15773
15785
|
const start = (firstPTS - initTime) / inputTimeScale;
|
|
15774
|
-
const end = nextAudioTs / inputTimeScale;
|
|
15786
|
+
const end = this.nextAudioTs / inputTimeScale;
|
|
15775
15787
|
const type = 'audio';
|
|
15776
15788
|
const audioData = {
|
|
15777
15789
|
data1: moof,
|
|
@@ -22935,6 +22947,11 @@ class EMEController extends Logger {
|
|
|
22935
22947
|
}
|
|
22936
22948
|
const keyIdArray = 'buffer' in keyId ? new Uint8Array(keyId.buffer, keyId.byteOffset, keyId.byteLength) : new Uint8Array(keyId);
|
|
22937
22949
|
if (mediaKeySessionContext.keySystem === KeySystems.PLAYREADY && keyIdArray.length === 16) {
|
|
22950
|
+
// On some devices, the key ID has already been converted for endianness.
|
|
22951
|
+
// In such cases, this key ID is the one we need to cache.
|
|
22952
|
+
const originKeyIdWithStatusChange = arrayToHex(keyIdArray);
|
|
22953
|
+
// Cache the original key IDs to ensure compatibility across all cases.
|
|
22954
|
+
keyStatuses[originKeyIdWithStatusChange] = status;
|
|
22938
22955
|
changeEndianness(keyIdArray);
|
|
22939
22956
|
}
|
|
22940
22957
|
const keyIdWithStatusChange = arrayToHex(keyIdArray);
|
|
@@ -25276,7 +25293,8 @@ class InterstitialsController extends Logger {
|
|
|
25276
25293
|
if (backwardSeek && currentTime < start || currentTime >= start + duration) {
|
|
25277
25294
|
var _playingItem$event;
|
|
25278
25295
|
if ((_playingItem$event = playingItem.event) != null && _playingItem$event.appendInPlace) {
|
|
25279
|
-
|
|
25296
|
+
// Return SourceBuffer(s) to primary player and flush
|
|
25297
|
+
this.clearAssetPlayers(playingItem.event, playingItem);
|
|
25280
25298
|
this.flushFrontBuffer(currentTime);
|
|
25281
25299
|
}
|
|
25282
25300
|
this.setScheduleToAssetAtTime(currentTime, playingAsset);
|
|
@@ -26986,11 +27004,14 @@ Schedule: ${scheduleItems.map(seg => segmentToString(seg))} pos: ${this.timeline
|
|
|
26986
27004
|
return player;
|
|
26987
27005
|
}
|
|
26988
27006
|
clearInterstitial(interstitial, toSegment) {
|
|
27007
|
+
this.clearAssetPlayers(interstitial, toSegment);
|
|
27008
|
+
// Remove asset list and resolved duration
|
|
27009
|
+
interstitial.reset();
|
|
27010
|
+
}
|
|
27011
|
+
clearAssetPlayers(interstitial, toSegment) {
|
|
26989
27012
|
interstitial.assetList.forEach(asset => {
|
|
26990
27013
|
this.clearAssetPlayer(asset.identifier, toSegment);
|
|
26991
27014
|
});
|
|
26992
|
-
// Remove asset list and resolved duration
|
|
26993
|
-
interstitial.reset();
|
|
26994
27015
|
}
|
|
26995
27016
|
resetAssetPlayer(assetId) {
|
|
26996
27017
|
// Reset asset player so that it's timeline can be adjusted without reloading the MVP
|
|
@@ -27182,10 +27203,10 @@ Schedule: ${scheduleItems.map(seg => segmentToString(seg))} pos: ${this.timeline
|
|
|
27182
27203
|
// Fallback to Primary by on current or future events by updating schedule to skip errored interstitials/assets
|
|
27183
27204
|
const flushStart = interstitial.timelineStart;
|
|
27184
27205
|
const playingItem = this.effectivePlayingItem;
|
|
27206
|
+
let timelinePos = this.timelinePos;
|
|
27185
27207
|
// Update schedule now that interstitial/assets are flagged with `error` for fallback
|
|
27186
27208
|
if (playingItem) {
|
|
27187
|
-
this.log(`Fallback to primary from event "${interstitial.identifier}" start: ${flushStart} pos: ${
|
|
27188
|
-
let timelinePos = this.timelinePos;
|
|
27209
|
+
this.log(`Fallback to primary from event "${interstitial.identifier}" start: ${flushStart} pos: ${timelinePos} playing: ${segmentToString(playingItem)} error: ${interstitial.error}`);
|
|
27189
27210
|
if (timelinePos === -1) {
|
|
27190
27211
|
timelinePos = this.hls.startPosition;
|
|
27191
27212
|
}
|
|
@@ -27197,14 +27218,15 @@ Schedule: ${scheduleItems.map(seg => segmentToString(seg))} pos: ${this.timeline
|
|
|
27197
27218
|
this.attachPrimary(flushStart, null);
|
|
27198
27219
|
this.flushFrontBuffer(flushStart);
|
|
27199
27220
|
}
|
|
27200
|
-
|
|
27201
|
-
return;
|
|
27202
|
-
}
|
|
27203
|
-
const scheduleIndex = this.schedule.findItemIndexAtTime(timelinePos);
|
|
27204
|
-
this.setSchedulePosition(scheduleIndex);
|
|
27205
|
-
} else {
|
|
27221
|
+
} else if (timelinePos === -1) {
|
|
27206
27222
|
this.checkStart();
|
|
27223
|
+
return;
|
|
27207
27224
|
}
|
|
27225
|
+
if (!this.schedule) {
|
|
27226
|
+
return;
|
|
27227
|
+
}
|
|
27228
|
+
const scheduleIndex = this.schedule.findItemIndexAtTime(timelinePos);
|
|
27229
|
+
this.setSchedulePosition(scheduleIndex);
|
|
27208
27230
|
}
|
|
27209
27231
|
|
|
27210
27232
|
// Asset List loading
|
|
@@ -27245,7 +27267,8 @@ Schedule: ${scheduleItems.map(seg => segmentToString(seg))} pos: ${this.timeline
|
|
|
27245
27267
|
// Abandon if new duration is reduced enough to land playback in primary start
|
|
27246
27268
|
const index = this.schedule.findItemIndexAtTime(this.timelinePos);
|
|
27247
27269
|
if (index !== scheduleIndex) {
|
|
27248
|
-
interstitial.error = new Error(`Interstitial no longer within playback range ${this.timelinePos} ${interstitial}`);
|
|
27270
|
+
interstitial.error = new Error(`Interstitial ${assets.length ? 'no longer within playback range' : 'asset-list is empty'} ${this.timelinePos} ${interstitial}`);
|
|
27271
|
+
this.log(interstitial.error.message);
|
|
27249
27272
|
this.updateSchedule(true);
|
|
27250
27273
|
this.primaryFallback(interstitial);
|
|
27251
27274
|
return;
|
|
@@ -34053,7 +34076,7 @@ class StreamController extends BaseStreamController {
|
|
|
34053
34076
|
onAudioTrackSwitching(event, data) {
|
|
34054
34077
|
const hls = this.hls;
|
|
34055
34078
|
// if any URL found on new audio track, it is an alternate audio track
|
|
34056
|
-
const fromAltAudio = this.altAudio
|
|
34079
|
+
const fromAltAudio = this.altAudio !== 0;
|
|
34057
34080
|
const altAudio = useAlternateAudio(data.url, hls);
|
|
34058
34081
|
// if we switch on main audio, ensure that main fragment scheduling is synced with media.buffered
|
|
34059
34082
|
// don't do anything if we switch to alt audio: audio stream controller is handling it.
|
|
@@ -34079,6 +34102,7 @@ class StreamController extends BaseStreamController {
|
|
|
34079
34102
|
}
|
|
34080
34103
|
// If switching from alt to main audio, flush all audio and trigger track switched
|
|
34081
34104
|
if (fromAltAudio) {
|
|
34105
|
+
this.altAudio = 0;
|
|
34082
34106
|
this.fragmentTracker.removeAllFragments();
|
|
34083
34107
|
hls.once(Events.BUFFER_FLUSHED, () => {
|
|
34084
34108
|
if (!this.hls) {
|
|
@@ -34916,14 +34940,22 @@ class KeyLoader extends Logger {
|
|
|
34916
34940
|
if (!keyInfo.decryptdata.keyId && (_frag$initSegment = frag.initSegment) != null && _frag$initSegment.data) {
|
|
34917
34941
|
const keyIds = parseKeyIdsFromTenc(frag.initSegment.data);
|
|
34918
34942
|
if (keyIds.length) {
|
|
34919
|
-
|
|
34943
|
+
let keyId = keyIds[0];
|
|
34920
34944
|
if (keyId.some(b => b !== 0)) {
|
|
34921
34945
|
this.log(`Using keyId found in init segment ${arrayToHex(keyId)}`);
|
|
34922
|
-
keyInfo.decryptdata.keyId = keyId;
|
|
34923
34946
|
LevelKey.setKeyIdForUri(keyInfo.decryptdata.uri, keyId);
|
|
34947
|
+
} else {
|
|
34948
|
+
keyId = LevelKey.addKeyIdForUri(keyInfo.decryptdata.uri);
|
|
34949
|
+
this.log(`Generating keyId to patch media ${arrayToHex(keyId)}`);
|
|
34924
34950
|
}
|
|
34951
|
+
keyInfo.decryptdata.keyId = keyId;
|
|
34925
34952
|
}
|
|
34926
34953
|
}
|
|
34954
|
+
if (!keyInfo.decryptdata.keyId && !isMediaFragment(frag)) {
|
|
34955
|
+
// Resolve so that unencrypted init segment is loaded
|
|
34956
|
+
// key id is extracted from tenc box when processing key for next segment above
|
|
34957
|
+
return Promise.resolve(keyLoadedData);
|
|
34958
|
+
}
|
|
34927
34959
|
const keySessionContextPromise = this.emeController.loadKey(keyLoadedData);
|
|
34928
34960
|
return (keyInfo.keyLoadPromise = keySessionContextPromise.then(keySessionContext => {
|
|
34929
34961
|
keyInfo.mediaKeySessionContext = keySessionContext;
|