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.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();
|
@@ -3079,7 +3079,9 @@
|
|
3079
3079
|
// Parsing of mp4a codecs strings in mp4-tools from media is incomplete as of d8c6c7a
|
3080
3080
|
// so use level codec is parsed codec is unavailable or incomplete
|
3081
3081
|
if (parsedCodec && (parsedCodec.length > 4 || ['ac-3', 'ec-3', 'alac', 'fLaC', 'Opus'].indexOf(parsedCodec) !== -1)) {
|
3082
|
-
|
3082
|
+
if (isCodecSupportedAsType(parsedCodec, 'audio') || isCodecSupportedAsType(parsedCodec, 'video')) {
|
3083
|
+
return parsedCodec;
|
3084
|
+
}
|
3083
3085
|
}
|
3084
3086
|
if (levelCodec) {
|
3085
3087
|
var levelCodecs = levelCodec.split(',');
|
@@ -3096,6 +3098,9 @@
|
|
3096
3098
|
}
|
3097
3099
|
return levelCodec || parsedCodec;
|
3098
3100
|
}
|
3101
|
+
function isCodecSupportedAsType(codec, type) {
|
3102
|
+
return isCodecType(codec, type) && isCodecMediaSourceSupported(codec, type);
|
3103
|
+
}
|
3099
3104
|
function convertAVC1ToAVCOTI(videoCodecs) {
|
3100
3105
|
// Convert avc1 codec string from RFC-4281 to RFC-6381 for MediaSource.isTypeSupported
|
3101
3106
|
// Examples: avc1.66.30 to avc1.42001e and avc1.77.30,avc1.66.30 to avc1.4d001e,avc1.42001e.
|
@@ -16662,7 +16667,7 @@
|
|
16662
16667
|
return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
|
16663
16668
|
}
|
16664
16669
|
|
16665
|
-
var version = "1.6.6-0.canary.
|
16670
|
+
var version = "1.6.6-0.canary.11342";
|
16666
16671
|
|
16667
16672
|
// ensure the worker ends up in the bundle
|
16668
16673
|
// If the worker should not be included this gets aliased to empty.js
|
@@ -34367,8 +34372,9 @@
|
|
34367
34372
|
video = tracks.video,
|
34368
34373
|
audiovideo = tracks.audiovideo;
|
34369
34374
|
if (audio) {
|
34370
|
-
var
|
34371
|
-
|
34375
|
+
var levelCodec = currentLevel.audioCodec;
|
34376
|
+
var audioCodec = pickMostCompleteCodecName(audio.codec, levelCodec);
|
34377
|
+
// Add level and profile to make up for remuxer not being able to parse full codec
|
34372
34378
|
// (logger warning "Unhandled audio codec...")
|
34373
34379
|
if (audioCodec === 'mp4a') {
|
34374
34380
|
audioCodec = 'mp4a.40.5';
|
@@ -34397,12 +34403,12 @@
|
|
34397
34403
|
audioCodec = 'mp4a.40.2';
|
34398
34404
|
this.log("Android: force audio codec to " + audioCodec);
|
34399
34405
|
}
|
34400
|
-
if (
|
34401
|
-
this.log("Swapping manifest audio codec \"" +
|
34406
|
+
if (levelCodec && levelCodec !== audioCodec) {
|
34407
|
+
this.log("Swapping manifest audio codec \"" + levelCodec + "\" for \"" + audioCodec + "\"");
|
34402
34408
|
}
|
34403
34409
|
audio.levelCodec = audioCodec;
|
34404
34410
|
audio.id = PlaylistLevelType.MAIN;
|
34405
|
-
this.log("Init audio buffer, container:" + audio.container + ", codecs[selected/level/parsed]=[" + (audioCodec || '') + "/" + (
|
34411
|
+
this.log("Init audio buffer, container:" + audio.container + ", codecs[selected/level/parsed]=[" + (audioCodec || '') + "/" + (levelCodec || '') + "/" + audio.codec + "]");
|
34406
34412
|
delete tracks.audiovideo;
|
34407
34413
|
}
|
34408
34414
|
if (video) {
|