hls.js 1.6.6-0.canary.11339 → 1.6.6-0.canary.11342
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 +14 -8
- package/dist/hls.js.map +1 -1
- package/dist/hls.light.js +14 -8
- 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 +14 -8
- 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 +14 -8
- 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 +2 -2
- package/src/controller/stream-controller.ts +6 -8
- package/src/utils/codecs.ts +10 -1
package/dist/hls.light.js
CHANGED
@@ -1165,7 +1165,7 @@
|
|
1165
1165
|
// Some browsers don't allow to use bind on console object anyway
|
1166
1166
|
// fallback to default if needed
|
1167
1167
|
try {
|
1168
|
-
newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.6-0.canary.
|
1168
|
+
newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.6-0.canary.11342");
|
1169
1169
|
} catch (e) {
|
1170
1170
|
/* log fn threw an exception. All logger methods are no-ops. */
|
1171
1171
|
return createLogger();
|
@@ -2961,7 +2961,9 @@
|
|
2961
2961
|
// Parsing of mp4a codecs strings in mp4-tools from media is incomplete as of d8c6c7a
|
2962
2962
|
// so use level codec is parsed codec is unavailable or incomplete
|
2963
2963
|
if (parsedCodec && (parsedCodec.length > 4 || ['ac-3', 'ec-3', 'alac', 'fLaC', 'Opus'].indexOf(parsedCodec) !== -1)) {
|
2964
|
-
|
2964
|
+
if (isCodecSupportedAsType(parsedCodec, 'audio') || isCodecSupportedAsType(parsedCodec, 'video')) {
|
2965
|
+
return parsedCodec;
|
2966
|
+
}
|
2965
2967
|
}
|
2966
2968
|
if (levelCodec) {
|
2967
2969
|
var levelCodecs = levelCodec.split(',');
|
@@ -2978,6 +2980,9 @@
|
|
2978
2980
|
}
|
2979
2981
|
return levelCodec || parsedCodec;
|
2980
2982
|
}
|
2983
|
+
function isCodecSupportedAsType(codec, type) {
|
2984
|
+
return isCodecType(codec, type) && isCodecMediaSourceSupported(codec, type);
|
2985
|
+
}
|
2981
2986
|
function convertAVC1ToAVCOTI(videoCodecs) {
|
2982
2987
|
// Convert avc1 codec string from RFC-4281 to RFC-6381 for MediaSource.isTypeSupported
|
2983
2988
|
// Examples: avc1.66.30 to avc1.42001e and avc1.77.30,avc1.66.30 to avc1.4d001e,avc1.42001e.
|
@@ -20509,7 +20514,7 @@
|
|
20509
20514
|
return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
|
20510
20515
|
}
|
20511
20516
|
|
20512
|
-
var version = "1.6.6-0.canary.
|
20517
|
+
var version = "1.6.6-0.canary.11342";
|
20513
20518
|
|
20514
20519
|
// ensure the worker ends up in the bundle
|
20515
20520
|
// If the worker should not be included this gets aliased to empty.js
|
@@ -21944,8 +21949,9 @@
|
|
21944
21949
|
video = tracks.video,
|
21945
21950
|
audiovideo = tracks.audiovideo;
|
21946
21951
|
if (audio) {
|
21947
|
-
var
|
21948
|
-
|
21952
|
+
var levelCodec = currentLevel.audioCodec;
|
21953
|
+
var audioCodec = pickMostCompleteCodecName(audio.codec, levelCodec);
|
21954
|
+
// Add level and profile to make up for remuxer not being able to parse full codec
|
21949
21955
|
// (logger warning "Unhandled audio codec...")
|
21950
21956
|
if (audioCodec === 'mp4a') {
|
21951
21957
|
audioCodec = 'mp4a.40.5';
|
@@ -21974,12 +21980,12 @@
|
|
21974
21980
|
audioCodec = 'mp4a.40.2';
|
21975
21981
|
this.log("Android: force audio codec to " + audioCodec);
|
21976
21982
|
}
|
21977
|
-
if (
|
21978
|
-
this.log("Swapping manifest audio codec \"" +
|
21983
|
+
if (levelCodec && levelCodec !== audioCodec) {
|
21984
|
+
this.log("Swapping manifest audio codec \"" + levelCodec + "\" for \"" + audioCodec + "\"");
|
21979
21985
|
}
|
21980
21986
|
audio.levelCodec = audioCodec;
|
21981
21987
|
audio.id = PlaylistLevelType.MAIN;
|
21982
|
-
this.log("Init audio buffer, container:" + audio.container + ", codecs[selected/level/parsed]=[" + (audioCodec || '') + "/" + (
|
21988
|
+
this.log("Init audio buffer, container:" + audio.container + ", codecs[selected/level/parsed]=[" + (audioCodec || '') + "/" + (levelCodec || '') + "/" + audio.codec + "]");
|
21983
21989
|
delete tracks.audiovideo;
|
21984
21990
|
}
|
21985
21991
|
if (video) {
|