hls.js 1.5.13-0.canary.10408 → 1.5.13-0.canary.10410
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 +13 -43
- package/dist/hls.js.map +1 -1
- package/dist/hls.light.js +14 -44
- 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 +13 -43
- 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 +13 -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/remux/mp4-remuxer.ts +0 -50
- package/src/utils/codecs.ts +13 -9
package/dist/hls.mjs
CHANGED
@@ -420,7 +420,7 @@ function enableLogs(debugConfig, context, id) {
|
|
420
420
|
// Some browsers don't allow to use bind on console object anyway
|
421
421
|
// fallback to default if needed
|
422
422
|
try {
|
423
|
-
newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.5.13-0.canary.
|
423
|
+
newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.5.13-0.canary.10410"}`);
|
424
424
|
} catch (e) {
|
425
425
|
/* log fn threw an exception. All logger methods are no-ops. */
|
426
426
|
return createLogger();
|
@@ -2896,14 +2896,18 @@ function pickMostCompleteCodecName(parsedCodec, levelCodec) {
|
|
2896
2896
|
}
|
2897
2897
|
function convertAVC1ToAVCOTI(codec) {
|
2898
2898
|
// Convert avc1 codec string from RFC-4281 to RFC-6381 for MediaSource.isTypeSupported
|
2899
|
-
|
2900
|
-
|
2901
|
-
|
2902
|
-
|
2903
|
-
|
2904
|
-
|
2899
|
+
// Examples: avc1.66.30 to avc1.42001e and avc1.77.30,avc1.66.30 to avc1.4d001e,avc1.42001e.
|
2900
|
+
const codecs = codec.split(',');
|
2901
|
+
for (let i = 0; i < codecs.length; i++) {
|
2902
|
+
const avcdata = codecs[i].split('.');
|
2903
|
+
if (avcdata.length > 2) {
|
2904
|
+
let result = avcdata.shift() + '.';
|
2905
|
+
result += parseInt(avcdata.shift()).toString(16);
|
2906
|
+
result += ('000' + parseInt(avcdata.shift()).toString(16)).slice(-4);
|
2907
|
+
codecs[i] = result;
|
2908
|
+
}
|
2905
2909
|
}
|
2906
|
-
return
|
2910
|
+
return codecs.join(',');
|
2907
2911
|
}
|
2908
2912
|
function getM2TSSupportedAudioTypes(preferManagedMediaSource) {
|
2909
2913
|
const MediaSource = getMediaSource(preferManagedMediaSource) || {
|
@@ -15740,40 +15744,6 @@ class MP4Remuxer {
|
|
15740
15744
|
this.isAudioContiguous = true;
|
15741
15745
|
return audioData;
|
15742
15746
|
}
|
15743
|
-
remuxEmptyAudio(track, timeOffset, contiguous, videoData) {
|
15744
|
-
const inputTimeScale = track.inputTimeScale;
|
15745
|
-
const mp4timeScale = track.samplerate ? track.samplerate : inputTimeScale;
|
15746
|
-
const scaleFactor = inputTimeScale / mp4timeScale;
|
15747
|
-
const nextAudioPts = this.nextAudioPts;
|
15748
|
-
// sync with video's timestamp
|
15749
|
-
const initDTS = this._initDTS;
|
15750
|
-
const init90kHz = initDTS.baseTime * 90000 / initDTS.timescale;
|
15751
|
-
const startDTS = (nextAudioPts !== null ? nextAudioPts : videoData.startDTS * inputTimeScale) + init90kHz;
|
15752
|
-
const endDTS = videoData.endDTS * inputTimeScale + init90kHz;
|
15753
|
-
// one sample's duration value
|
15754
|
-
const frameDuration = scaleFactor * AAC_SAMPLES_PER_FRAME;
|
15755
|
-
// samples count of this segment's duration
|
15756
|
-
const nbSamples = Math.ceil((endDTS - startDTS) / frameDuration);
|
15757
|
-
// silent frame
|
15758
|
-
const silentFrame = AAC.getSilentFrame(track.parsedCodec || track.manifestCodec || track.codec, track.channelCount);
|
15759
|
-
logger.warn('[mp4-remuxer]: remux empty Audio');
|
15760
|
-
// Can't remux if we can't generate a silent frame...
|
15761
|
-
if (!silentFrame) {
|
15762
|
-
logger.trace('[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec');
|
15763
|
-
return;
|
15764
|
-
}
|
15765
|
-
const samples = [];
|
15766
|
-
for (let i = 0; i < nbSamples; i++) {
|
15767
|
-
const stamp = startDTS + i * frameDuration;
|
15768
|
-
samples.push({
|
15769
|
-
unit: silentFrame,
|
15770
|
-
pts: stamp,
|
15771
|
-
dts: stamp
|
15772
|
-
});
|
15773
|
-
}
|
15774
|
-
track.samples = samples;
|
15775
|
-
return this.remuxAudio(track, timeOffset, contiguous, false);
|
15776
|
-
}
|
15777
15747
|
}
|
15778
15748
|
function normalizePts(value, reference) {
|
15779
15749
|
let offset;
|
@@ -29285,7 +29255,7 @@ class Hls {
|
|
29285
29255
|
* Get the video-dev/hls.js package version.
|
29286
29256
|
*/
|
29287
29257
|
static get version() {
|
29288
|
-
return "1.5.13-0.canary.
|
29258
|
+
return "1.5.13-0.canary.10410";
|
29289
29259
|
}
|
29290
29260
|
|
29291
29261
|
/**
|