hls.js 1.6.0-rc.2 → 1.6.0-rc.2.0.canary.11083
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/hls.d.mts +1 -0
- package/dist/hls.d.ts +1 -0
- package/dist/hls.js +85 -42
- package/dist/hls.js.d.ts +1 -0
- package/dist/hls.js.map +1 -1
- package/dist/hls.light.js +32 -25
- package/dist/hls.light.js.map +1 -1
- package/dist/hls.light.min.js +1 -1
- package/dist/hls.light.min.js.map +1 -1
- package/dist/hls.light.mjs +34 -27
- package/dist/hls.light.mjs.map +1 -1
- package/dist/hls.min.js +1 -1
- package/dist/hls.min.js.map +1 -1
- package/dist/hls.mjs +86 -43
- package/dist/hls.mjs.map +1 -1
- package/dist/hls.worker.js +1 -1
- package/dist/hls.worker.js.map +1 -1
- package/package.json +1 -1
- package/src/controller/abr-controller.ts +10 -5
- package/src/controller/base-stream-controller.ts +8 -1
- package/src/controller/interstitials-controller.ts +61 -17
- package/src/controller/interstitials-schedule.ts +1 -1
- package/src/exports-named.ts +2 -0
- package/src/utils/mp4-tools.ts +13 -15
package/dist/hls.light.mjs
CHANGED
@@ -402,7 +402,7 @@ function enableLogs(debugConfig, context, id) {
|
|
402
402
|
// Some browsers don't allow to use bind on console object anyway
|
403
403
|
// fallback to default if needed
|
404
404
|
try {
|
405
|
-
newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.6.0-rc.2"}`);
|
405
|
+
newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.6.0-rc.2.0.canary.11083"}`);
|
406
406
|
} catch (e) {
|
407
407
|
/* log fn threw an exception. All logger methods are no-ops. */
|
408
408
|
return createLogger();
|
@@ -1308,29 +1308,27 @@ function parseInitSegment(initSegment) {
|
|
1308
1308
|
soun: ElementaryStreamTypes.AUDIO,
|
1309
1309
|
vide: ElementaryStreamTypes.VIDEO
|
1310
1310
|
}[hdlrType];
|
1311
|
+
// Parse codec details
|
1312
|
+
const stsdBox = findBox(trak, ['mdia', 'minf', 'stbl', 'stsd'])[0];
|
1313
|
+
const stsd = parseStsd(stsdBox);
|
1311
1314
|
if (type) {
|
1312
|
-
//
|
1313
|
-
|
1314
|
-
|
1315
|
-
|
1316
|
-
|
1317
|
-
|
1318
|
-
|
1319
|
-
|
1320
|
-
|
1321
|
-
|
1322
|
-
|
1323
|
-
|
1324
|
-
|
1325
|
-
|
1326
|
-
|
1327
|
-
|
1328
|
-
|
1329
|
-
timescale,
|
1330
|
-
type: hdlrType,
|
1331
|
-
stsd
|
1332
|
-
};
|
1333
|
-
}
|
1315
|
+
// Add 'audio', 'video', and 'audiovideo' track records that will map to SourceBuffers
|
1316
|
+
result[trackId] = {
|
1317
|
+
timescale,
|
1318
|
+
type,
|
1319
|
+
stsd
|
1320
|
+
};
|
1321
|
+
result[type] = _objectSpread2({
|
1322
|
+
timescale,
|
1323
|
+
id: trackId
|
1324
|
+
}, stsd);
|
1325
|
+
} else {
|
1326
|
+
// Add 'meta' and other track records required by `offsetStartDTS`
|
1327
|
+
result[trackId] = {
|
1328
|
+
timescale,
|
1329
|
+
type: hdlrType,
|
1330
|
+
stsd
|
1331
|
+
};
|
1334
1332
|
}
|
1335
1333
|
}
|
1336
1334
|
}
|
@@ -2897,6 +2895,7 @@ class AbrController extends Logger {
|
|
2897
2895
|
this.fragCurrent = null;
|
2898
2896
|
this.partCurrent = null;
|
2899
2897
|
this.bitrateTestDelay = 0;
|
2898
|
+
this.rebufferNotice = -1;
|
2900
2899
|
this.bwEstimator = void 0;
|
2901
2900
|
/*
|
2902
2901
|
This method monitors the download rate of the current fragment, and will downswitch if that fragment will not load
|
@@ -3362,6 +3361,7 @@ class AbrController extends Logger {
|
|
3362
3361
|
if (bufferStarvationDelay) {
|
3363
3362
|
const _bestLevel = this.findBestLevel(avgbw, minAutoLevel, maxAutoLevel, bufferStarvationDelay, 0, bwFactor, bwUpFactor);
|
3364
3363
|
if (_bestLevel >= 0) {
|
3364
|
+
this.rebufferNotice = -1;
|
3365
3365
|
return _bestLevel;
|
3366
3366
|
}
|
3367
3367
|
}
|
@@ -3384,7 +3384,10 @@ class AbrController extends Logger {
|
|
3384
3384
|
}
|
3385
3385
|
}
|
3386
3386
|
const bestLevel = this.findBestLevel(avgbw, minAutoLevel, maxAutoLevel, bufferStarvationDelay, maxStarvationDelay, bwFactor, bwUpFactor);
|
3387
|
-
this.
|
3387
|
+
if (this.rebufferNotice !== bestLevel) {
|
3388
|
+
this.rebufferNotice = bestLevel;
|
3389
|
+
this.info(`${bufferStarvationDelay ? 'rebuffering expected' : 'buffer is empty'}, optimal quality level ${bestLevel}`);
|
3390
|
+
}
|
3388
3391
|
if (bestLevel > -1) {
|
3389
3392
|
return bestLevel;
|
3390
3393
|
}
|
@@ -8669,7 +8672,11 @@ class BaseStreamController extends TaskLoop {
|
|
8669
8672
|
const end = this.loadingParts ? levelDetails.partEnd : levelDetails.fragmentEnd;
|
8670
8673
|
frag = this.getFragmentAtPosition(pos, end, levelDetails);
|
8671
8674
|
}
|
8672
|
-
|
8675
|
+
let programFrag = this.filterReplacedPrimary(frag, levelDetails);
|
8676
|
+
if (!programFrag && frag) {
|
8677
|
+
const curSNIdx = frag.sn - levelDetails.startSN;
|
8678
|
+
programFrag = this.filterReplacedPrimary(fragments[curSNIdx + 1] || null, levelDetails);
|
8679
|
+
}
|
8673
8680
|
return this.mapToInitFragWhenRequired(programFrag);
|
8674
8681
|
}
|
8675
8682
|
isLoopLoading(frag, targetBufferTime) {
|
@@ -19668,7 +19675,7 @@ function assignTrackIdsByGroup(tracks) {
|
|
19668
19675
|
});
|
19669
19676
|
}
|
19670
19677
|
|
19671
|
-
const version = "1.6.0-rc.2";
|
19678
|
+
const version = "1.6.0-rc.2.0.canary.11083";
|
19672
19679
|
|
19673
19680
|
// ensure the worker ends up in the bundle
|
19674
19681
|
// If the worker should not be included this gets aliased to empty.js
|
@@ -23285,5 +23292,5 @@ var KeySystems = emptyEsExports.KeySystems;
|
|
23285
23292
|
var SubtitleStreamController = emptyEsExports.SubtitleStreamController;
|
23286
23293
|
var TimelineController = emptyEsExports.TimelineController;
|
23287
23294
|
var requestMediaKeySystemAccess = emptyEsExports.requestMediaKeySystemAccess;
|
23288
|
-
export { AbrController, AttrList, Cues as AudioStreamController, Cues as AudioTrackController, BasePlaylistController, BaseSegment, BaseStreamController, BufferController, Cues as CMCDController, CapLevelController, ChunkMetadata, ContentSteeringController, Cues, DateRange, Cues as EMEController, ErrorActionFlags, ErrorController, ErrorDetails, ErrorTypes, Events, FPSController, FetchLoader, Fragment, Hls, HlsSkip, HlsUrlParameters, KeySystemFormats, KeySystems, Level, LevelDetails, LevelKey, LoadStats, MetadataSchema, NetworkErrorAction, Part, PlaylistLevelType, SubtitleStreamController, Cues as SubtitleTrackController, TimelineController, XhrLoader, Hls as default, fetchSupported, getMediaSource, isMSESupported, isSupported, requestMediaKeySystemAccess };
|
23295
|
+
export { AbrController, AttrList, Cues as AudioStreamController, Cues as AudioTrackController, BasePlaylistController, BaseSegment, BaseStreamController, BufferController, Cues as CMCDController, CapLevelController, ChunkMetadata, ContentSteeringController, Cues, DateRange, Cues as EMEController, ErrorActionFlags, ErrorController, ErrorDetails, ErrorTypes, Events, FPSController, FetchLoader, Fragment, Hls, HlsSkip, HlsUrlParameters, KeySystemFormats, KeySystems, Level, LevelDetails, LevelKey, LoadStats, M3U8Parser, MetadataSchema, NetworkErrorAction, Part, PlaylistLevelType, SubtitleStreamController, Cues as SubtitleTrackController, TimelineController, XhrLoader, Hls as default, fetchSupported, getMediaSource, isMSESupported, isSupported, requestMediaKeySystemAccess };
|
23289
23296
|
//# sourceMappingURL=hls.light.mjs.map
|