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 CHANGED
@@ -522,7 +522,7 @@
522
522
  // Some browsers don't allow to use bind on console object anyway
523
523
  // fallback to default if needed
524
524
  try {
525
- newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.13-0.canary.10408");
525
+ newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.13-0.canary.10410");
526
526
  } catch (e) {
527
527
  /* log fn threw an exception. All logger methods are no-ops. */
528
528
  return createLogger();
@@ -3116,14 +3116,18 @@
3116
3116
  }
3117
3117
  function convertAVC1ToAVCOTI(codec) {
3118
3118
  // Convert avc1 codec string from RFC-4281 to RFC-6381 for MediaSource.isTypeSupported
3119
- var avcdata = codec.split('.');
3120
- if (avcdata.length > 2) {
3121
- var result = avcdata.shift() + '.';
3122
- result += parseInt(avcdata.shift()).toString(16);
3123
- result += ('000' + parseInt(avcdata.shift()).toString(16)).slice(-4);
3124
- return result;
3119
+ // Examples: avc1.66.30 to avc1.42001e and avc1.77.30,avc1.66.30 to avc1.4d001e,avc1.42001e.
3120
+ var codecs = codec.split(',');
3121
+ for (var i = 0; i < codecs.length; i++) {
3122
+ var avcdata = codecs[i].split('.');
3123
+ if (avcdata.length > 2) {
3124
+ var result = avcdata.shift() + '.';
3125
+ result += parseInt(avcdata.shift()).toString(16);
3126
+ result += ('000' + parseInt(avcdata.shift()).toString(16)).slice(-4);
3127
+ codecs[i] = result;
3128
+ }
3125
3129
  }
3126
- return codec;
3130
+ return codecs.join(',');
3127
3131
  }
3128
3132
  function getM2TSSupportedAudioTypes(preferManagedMediaSource) {
3129
3133
  var MediaSource = getMediaSource(preferManagedMediaSource) || {
@@ -16135,40 +16139,6 @@
16135
16139
  this.isAudioContiguous = true;
16136
16140
  return audioData;
16137
16141
  };
16138
- _proto.remuxEmptyAudio = function remuxEmptyAudio(track, timeOffset, contiguous, videoData) {
16139
- var inputTimeScale = track.inputTimeScale;
16140
- var mp4timeScale = track.samplerate ? track.samplerate : inputTimeScale;
16141
- var scaleFactor = inputTimeScale / mp4timeScale;
16142
- var nextAudioPts = this.nextAudioPts;
16143
- // sync with video's timestamp
16144
- var initDTS = this._initDTS;
16145
- var init90kHz = initDTS.baseTime * 90000 / initDTS.timescale;
16146
- var startDTS = (nextAudioPts !== null ? nextAudioPts : videoData.startDTS * inputTimeScale) + init90kHz;
16147
- var endDTS = videoData.endDTS * inputTimeScale + init90kHz;
16148
- // one sample's duration value
16149
- var frameDuration = scaleFactor * AAC_SAMPLES_PER_FRAME;
16150
- // samples count of this segment's duration
16151
- var nbSamples = Math.ceil((endDTS - startDTS) / frameDuration);
16152
- // silent frame
16153
- var silentFrame = AAC.getSilentFrame(track.parsedCodec || track.manifestCodec || track.codec, track.channelCount);
16154
- logger.warn('[mp4-remuxer]: remux empty Audio');
16155
- // Can't remux if we can't generate a silent frame...
16156
- if (!silentFrame) {
16157
- logger.trace('[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec');
16158
- return;
16159
- }
16160
- var samples = [];
16161
- for (var i = 0; i < nbSamples; i++) {
16162
- var stamp = startDTS + i * frameDuration;
16163
- samples.push({
16164
- unit: silentFrame,
16165
- pts: stamp,
16166
- dts: stamp
16167
- });
16168
- }
16169
- track.samples = samples;
16170
- return this.remuxAudio(track, timeOffset, contiguous, false);
16171
- };
16172
16142
  return MP4Remuxer;
16173
16143
  }();
16174
16144
  function normalizePts(value, reference) {
@@ -30805,7 +30775,7 @@
30805
30775
  * Get the video-dev/hls.js package version.
30806
30776
  */
30807
30777
  function get() {
30808
- return "1.5.13-0.canary.10408";
30778
+ return "1.5.13-0.canary.10410";
30809
30779
  }
30810
30780
  }, {
30811
30781
  key: "Events",