hls.js 1.5.13-0.canary.10408 → 1.5.13-0.canary.10411

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.light.js CHANGED
@@ -493,7 +493,7 @@
493
493
  // Some browsers don't allow to use bind on console object anyway
494
494
  // fallback to default if needed
495
495
  try {
496
- newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.13-0.canary.10408");
496
+ newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.13-0.canary.10411");
497
497
  } catch (e) {
498
498
  /* log fn threw an exception. All logger methods are no-ops. */
499
499
  return createLogger();
@@ -2685,14 +2685,18 @@
2685
2685
  }
2686
2686
  function convertAVC1ToAVCOTI(codec) {
2687
2687
  // Convert avc1 codec string from RFC-4281 to RFC-6381 for MediaSource.isTypeSupported
2688
- var avcdata = codec.split('.');
2689
- if (avcdata.length > 2) {
2690
- var result = avcdata.shift() + '.';
2691
- result += parseInt(avcdata.shift()).toString(16);
2692
- result += ('000' + parseInt(avcdata.shift()).toString(16)).slice(-4);
2693
- return result;
2694
- }
2695
- return codec;
2688
+ // Examples: avc1.66.30 to avc1.42001e and avc1.77.30,avc1.66.30 to avc1.4d001e,avc1.42001e.
2689
+ var codecs = codec.split(',');
2690
+ for (var i = 0; i < codecs.length; i++) {
2691
+ var avcdata = codecs[i].split('.');
2692
+ if (avcdata.length > 2) {
2693
+ var result = avcdata.shift() + '.';
2694
+ result += parseInt(avcdata.shift()).toString(16);
2695
+ result += ('000' + parseInt(avcdata.shift()).toString(16)).slice(-4);
2696
+ codecs[i] = result;
2697
+ }
2698
+ }
2699
+ return codecs.join(',');
2696
2700
  }
2697
2701
  function getM2TSSupportedAudioTypes(preferManagedMediaSource) {
2698
2702
  var MediaSource = getMediaSource(preferManagedMediaSource) || {
@@ -18160,40 +18164,6 @@
18160
18164
  this.isAudioContiguous = true;
18161
18165
  return audioData;
18162
18166
  };
18163
- _proto.remuxEmptyAudio = function remuxEmptyAudio(track, timeOffset, contiguous, videoData) {
18164
- var inputTimeScale = track.inputTimeScale;
18165
- var mp4timeScale = track.samplerate ? track.samplerate : inputTimeScale;
18166
- var scaleFactor = inputTimeScale / mp4timeScale;
18167
- var nextAudioPts = this.nextAudioPts;
18168
- // sync with video's timestamp
18169
- var initDTS = this._initDTS;
18170
- var init90kHz = initDTS.baseTime * 90000 / initDTS.timescale;
18171
- var startDTS = (nextAudioPts !== null ? nextAudioPts : videoData.startDTS * inputTimeScale) + init90kHz;
18172
- var endDTS = videoData.endDTS * inputTimeScale + init90kHz;
18173
- // one sample's duration value
18174
- var frameDuration = scaleFactor * AAC_SAMPLES_PER_FRAME;
18175
- // samples count of this segment's duration
18176
- var nbSamples = Math.ceil((endDTS - startDTS) / frameDuration);
18177
- // silent frame
18178
- var silentFrame = AAC.getSilentFrame(track.parsedCodec || track.manifestCodec || track.codec, track.channelCount);
18179
- logger.warn('[mp4-remuxer]: remux empty Audio');
18180
- // Can't remux if we can't generate a silent frame...
18181
- if (!silentFrame) {
18182
- logger.trace('[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec');
18183
- return;
18184
- }
18185
- var samples = [];
18186
- for (var i = 0; i < nbSamples; i++) {
18187
- var stamp = startDTS + i * frameDuration;
18188
- samples.push({
18189
- unit: silentFrame,
18190
- pts: stamp,
18191
- dts: stamp
18192
- });
18193
- }
18194
- track.samples = samples;
18195
- return this.remuxAudio(track, timeOffset, contiguous, false);
18196
- };
18197
18167
  return MP4Remuxer;
18198
18168
  }();
18199
18169
  function normalizePts(value, reference) {
@@ -22017,7 +21987,7 @@
22017
21987
  * Get the video-dev/hls.js package version.
22018
21988
  */
22019
21989
  function get() {
22020
- return "1.5.13-0.canary.10408";
21990
+ return "1.5.13-0.canary.10411";
22021
21991
  }
22022
21992
  }, {
22023
21993
  key: "Events",