hls.js 1.6.0-rc.1.0.canary.11076 → 1.6.0-rc.1.0.canary.11078
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.js +45 -15
- package/dist/hls.js.map +1 -1
- package/dist/hls.light.js +45 -15
- 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 +45 -15
- 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 +45 -15
- 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/buffer-controller.ts +6 -4
- package/src/remux/passthrough-remuxer.ts +1 -0
- package/src/utils/codecs.ts +19 -0
- package/src/utils/mp4-tools.ts +28 -10
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.1.0.canary.
|
1047
|
+
newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-rc.1.0.canary.11078");
|
1048
1048
|
} catch (e) {
|
1049
1049
|
/* log fn threw an exception. All logger methods are no-ops. */
|
1050
1050
|
return createLogger();
|
@@ -1809,16 +1809,27 @@
|
|
1809
1809
|
}[hdlrType];
|
1810
1810
|
if (type) {
|
1811
1811
|
// Parse codec details
|
1812
|
-
var
|
1813
|
-
var
|
1814
|
-
|
1815
|
-
|
1816
|
-
|
1817
|
-
|
1818
|
-
|
1819
|
-
|
1820
|
-
|
1821
|
-
|
1812
|
+
var stsdBox = findBox(trak, ['mdia', 'minf', 'stbl', 'stsd'])[0];
|
1813
|
+
var stsd = parseStsd(stsdBox);
|
1814
|
+
if (type) {
|
1815
|
+
// Add 'audio', 'video', and 'audiovideo' track records that will map to SourceBuffers
|
1816
|
+
result[trackId] = {
|
1817
|
+
timescale: timescale,
|
1818
|
+
type: type,
|
1819
|
+
stsd: stsd
|
1820
|
+
};
|
1821
|
+
result[type] = _objectSpread2({
|
1822
|
+
timescale: timescale,
|
1823
|
+
id: trackId
|
1824
|
+
}, stsd);
|
1825
|
+
} else {
|
1826
|
+
// Add 'meta' and other track records required by `offsetStartDTS`
|
1827
|
+
result[trackId] = {
|
1828
|
+
timescale: timescale,
|
1829
|
+
type: hdlrType,
|
1830
|
+
stsd: stsd
|
1831
|
+
};
|
1832
|
+
}
|
1822
1833
|
}
|
1823
1834
|
}
|
1824
1835
|
}
|
@@ -2270,6 +2281,8 @@
|
|
2270
2281
|
}
|
2271
2282
|
return duration;
|
2272
2283
|
}
|
2284
|
+
|
2285
|
+
// TODO: Remove `offsetStartDTS` in favor of using `timestampOffset` (issue #5715)
|
2273
2286
|
function offsetStartDTS(initData, fmp4, timeOffset) {
|
2274
2287
|
findBox(fmp4, ['moof', 'traf']).forEach(function (traf) {
|
2275
2288
|
findBox(traf, ['tfhd']).forEach(function (tfhd) {
|
@@ -2870,6 +2883,21 @@
|
|
2870
2883
|
return getCodecCompatibleNameLower(m.toLowerCase(), preferManagedMediaSource);
|
2871
2884
|
});
|
2872
2885
|
}
|
2886
|
+
function replaceVideoCodec(originalCodecs, newVideoCodec) {
|
2887
|
+
var codecs = [];
|
2888
|
+
if (originalCodecs) {
|
2889
|
+
var allCodecs = originalCodecs.split(',');
|
2890
|
+
for (var i = 0; i < allCodecs.length; i++) {
|
2891
|
+
if (!isCodecType(allCodecs[i], 'video')) {
|
2892
|
+
codecs.push(allCodecs[i]);
|
2893
|
+
}
|
2894
|
+
}
|
2895
|
+
}
|
2896
|
+
if (newVideoCodec) {
|
2897
|
+
codecs.push(newVideoCodec);
|
2898
|
+
}
|
2899
|
+
return codecs.join(',');
|
2900
|
+
}
|
2873
2901
|
function pickMostCompleteCodecName(parsedCodec, levelCodec) {
|
2874
2902
|
// Parsing of mp4a codecs strings in mp4-tools from media is incomplete as of d8c6c7a
|
2875
2903
|
// so use level codec is parsed codec is unavailable or incomplete
|
@@ -6201,10 +6229,11 @@
|
|
6201
6229
|
_proto.getTrackCodec = function getTrackCodec(track, trackName) {
|
6202
6230
|
// Use supplemental video codec when supported when adding SourceBuffer (#5558)
|
6203
6231
|
var supplementalCodec = track.supplemental;
|
6204
|
-
|
6205
|
-
|
6232
|
+
var trackCodec = track.codec;
|
6233
|
+
if (supplementalCodec && (trackName === 'video' || trackName === 'audiovideo') && areCodecsMediaSourceSupported(supplementalCodec, 'video')) {
|
6234
|
+
trackCodec = replaceVideoCodec(trackCodec, supplementalCodec);
|
6206
6235
|
}
|
6207
|
-
var codec = pickMostCompleteCodecName(
|
6236
|
+
var codec = pickMostCompleteCodecName(trackCodec, track.levelCodec);
|
6208
6237
|
if (codec) {
|
6209
6238
|
if (trackName.slice(0, 5) === 'audio') {
|
6210
6239
|
return getCodecCompatibleName(codec, this.appendSource);
|
@@ -14001,6 +14030,7 @@
|
|
14001
14030
|
tracks.audiovideo = {
|
14002
14031
|
container: 'video/mp4',
|
14003
14032
|
codec: audioCodec + ',' + videoCodec,
|
14033
|
+
supplemental: initData.video.supplemental,
|
14004
14034
|
initSegment: initSegment,
|
14005
14035
|
id: 'main'
|
14006
14036
|
};
|
@@ -20223,7 +20253,7 @@
|
|
20223
20253
|
return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
|
20224
20254
|
}
|
20225
20255
|
|
20226
|
-
var version = "1.6.0-rc.1.0.canary.
|
20256
|
+
var version = "1.6.0-rc.1.0.canary.11078";
|
20227
20257
|
|
20228
20258
|
// ensure the worker ends up in the bundle
|
20229
20259
|
// If the worker should not be included this gets aliased to empty.js
|