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.js
CHANGED
@@ -1044,7 +1044,7 @@
|
|
1044
1044
|
// Some browsers don't allow to use bind on console object anyway
|
1045
1045
|
// fallback to default if needed
|
1046
1046
|
try {
|
1047
|
-
newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-rc.2");
|
1047
|
+
newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-rc.2.0.canary.11083");
|
1048
1048
|
} catch (e) {
|
1049
1049
|
/* log fn threw an exception. All logger methods are no-ops. */
|
1050
1050
|
return createLogger();
|
@@ -1807,29 +1807,27 @@
|
|
1807
1807
|
soun: ElementaryStreamTypes.AUDIO,
|
1808
1808
|
vide: ElementaryStreamTypes.VIDEO
|
1809
1809
|
}[hdlrType];
|
1810
|
+
// Parse codec details
|
1811
|
+
var stsdBox = findBox(trak, ['mdia', 'minf', 'stbl', 'stsd'])[0];
|
1812
|
+
var stsd = parseStsd(stsdBox);
|
1810
1813
|
if (type) {
|
1811
|
-
//
|
1812
|
-
|
1813
|
-
|
1814
|
-
|
1815
|
-
|
1816
|
-
|
1817
|
-
|
1818
|
-
|
1819
|
-
|
1820
|
-
|
1821
|
-
|
1822
|
-
|
1823
|
-
|
1824
|
-
|
1825
|
-
|
1826
|
-
|
1827
|
-
|
1828
|
-
timescale: timescale,
|
1829
|
-
type: hdlrType,
|
1830
|
-
stsd: stsd
|
1831
|
-
};
|
1832
|
-
}
|
1814
|
+
// Add 'audio', 'video', and 'audiovideo' track records that will map to SourceBuffers
|
1815
|
+
result[trackId] = {
|
1816
|
+
timescale: timescale,
|
1817
|
+
type: type,
|
1818
|
+
stsd: stsd
|
1819
|
+
};
|
1820
|
+
result[type] = _objectSpread2({
|
1821
|
+
timescale: timescale,
|
1822
|
+
id: trackId
|
1823
|
+
}, stsd);
|
1824
|
+
} else {
|
1825
|
+
// Add 'meta' and other track records required by `offsetStartDTS`
|
1826
|
+
result[trackId] = {
|
1827
|
+
timescale: timescale,
|
1828
|
+
type: hdlrType,
|
1829
|
+
stsd: stsd
|
1830
|
+
};
|
1833
1831
|
}
|
1834
1832
|
}
|
1835
1833
|
}
|
@@ -3471,6 +3469,7 @@
|
|
3471
3469
|
_this.fragCurrent = null;
|
3472
3470
|
_this.partCurrent = null;
|
3473
3471
|
_this.bitrateTestDelay = 0;
|
3472
|
+
_this.rebufferNotice = -1;
|
3474
3473
|
_this.bwEstimator = void 0;
|
3475
3474
|
/*
|
3476
3475
|
This method monitors the download rate of the current fragment, and will downswitch if that fragment will not load
|
@@ -3861,6 +3860,7 @@
|
|
3861
3860
|
if (bufferStarvationDelay) {
|
3862
3861
|
var _bestLevel = this.findBestLevel(avgbw, minAutoLevel, maxAutoLevel, bufferStarvationDelay, 0, bwFactor, bwUpFactor);
|
3863
3862
|
if (_bestLevel >= 0) {
|
3863
|
+
this.rebufferNotice = -1;
|
3864
3864
|
return _bestLevel;
|
3865
3865
|
}
|
3866
3866
|
}
|
@@ -3883,7 +3883,10 @@
|
|
3883
3883
|
}
|
3884
3884
|
}
|
3885
3885
|
var bestLevel = this.findBestLevel(avgbw, minAutoLevel, maxAutoLevel, bufferStarvationDelay, maxStarvationDelay, bwFactor, bwUpFactor);
|
3886
|
-
this.
|
3886
|
+
if (this.rebufferNotice !== bestLevel) {
|
3887
|
+
this.rebufferNotice = bestLevel;
|
3888
|
+
this.info((bufferStarvationDelay ? 'rebuffering expected' : 'buffer is empty') + ", optimal quality level " + bestLevel);
|
3889
|
+
}
|
3887
3890
|
if (bestLevel > -1) {
|
3888
3891
|
return bestLevel;
|
3889
3892
|
}
|
@@ -17424,6 +17427,10 @@
|
|
17424
17427
|
frag = this.getFragmentAtPosition(pos, end, levelDetails);
|
17425
17428
|
}
|
17426
17429
|
var programFrag = this.filterReplacedPrimary(frag, levelDetails);
|
17430
|
+
if (!programFrag && frag) {
|
17431
|
+
var curSNIdx = frag.sn - levelDetails.startSN;
|
17432
|
+
programFrag = this.filterReplacedPrimary(fragments[curSNIdx + 1] || null, levelDetails);
|
17433
|
+
}
|
17427
17434
|
return this.mapToInitFragWhenRequired(programFrag);
|
17428
17435
|
};
|
17429
17436
|
_proto.isLoopLoading = function isLoopLoading(frag, targetBufferTime) {
|
@@ -20289,7 +20296,7 @@
|
|
20289
20296
|
return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
|
20290
20297
|
}
|
20291
20298
|
|
20292
|
-
var version = "1.6.0-rc.2";
|
20299
|
+
var version = "1.6.0-rc.2.0.canary.11083";
|
20293
20300
|
|
20294
20301
|
// ensure the worker ends up in the bundle
|
20295
20302
|
// If the worker should not be included this gets aliased to empty.js
|