hls.js 1.6.0-beta.1.0.canary.10809 → 1.6.0-beta.1.0.canary.10810
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 +16 -11
- package/dist/hls.js.map +1 -1
- package/dist/hls.light.js +9 -6
- 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 +9 -6
- 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 +16 -11
- package/dist/hls.mjs.map +1 -1
- package/dist/hls.worker.js +1 -1
- package/package.json +1 -1
- package/src/controller/audio-track-controller.ts +4 -4
- package/src/controller/interstitials-controller.ts +4 -0
- package/src/controller/stream-controller.ts +4 -4
- package/src/utils/rendition-helper.ts +5 -0
package/dist/hls.light.js
CHANGED
@@ -1028,7 +1028,7 @@
|
|
1028
1028
|
// Some browsers don't allow to use bind on console object anyway
|
1029
1029
|
// fallback to default if needed
|
1030
1030
|
try {
|
1031
|
-
newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-beta.1.0.canary.
|
1031
|
+
newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.6.0-beta.1.0.canary.10810");
|
1032
1032
|
} catch (e) {
|
1033
1033
|
/* log fn threw an exception. All logger methods are no-ops. */
|
1034
1034
|
return createLogger();
|
@@ -1749,6 +1749,10 @@
|
|
1749
1749
|
return tiers;
|
1750
1750
|
}, {});
|
1751
1751
|
}
|
1752
|
+
function useAlternateAudio(audioTrackUrl, hls) {
|
1753
|
+
var _hls$levels$hls$loadL;
|
1754
|
+
return !!audioTrackUrl && audioTrackUrl !== ((_hls$levels$hls$loadL = hls.levels[hls.loadLevel]) == null ? void 0 : _hls$levels$hls$loadL.uri);
|
1755
|
+
}
|
1752
1756
|
|
1753
1757
|
var AbrController = /*#__PURE__*/function (_Logger) {
|
1754
1758
|
function AbrController(_hls) {
|
@@ -19758,7 +19762,7 @@
|
|
19758
19762
|
return !remuxResult.audio && !remuxResult.video && !remuxResult.text && !remuxResult.id3 && !remuxResult.initSegment;
|
19759
19763
|
}
|
19760
19764
|
|
19761
|
-
var version = "1.6.0-beta.1.0.canary.
|
19765
|
+
var version = "1.6.0-beta.1.0.canary.10810";
|
19762
19766
|
|
19763
19767
|
// ensure the worker ends up in the bundle
|
19764
19768
|
// If the worker should not be included this gets aliased to empty.js
|
@@ -20752,9 +20756,10 @@
|
|
20752
20756
|
transmuxer.push(payload, initSegmentData, audioCodec, videoCodec, frag, part, details.totalduration, accurateTimeOffset, chunkMeta, initPTS);
|
20753
20757
|
};
|
20754
20758
|
_proto.onAudioTrackSwitching = function onAudioTrackSwitching(event, data) {
|
20759
|
+
var hls = this.hls;
|
20755
20760
|
// if any URL found on new audio track, it is an alternate audio track
|
20756
20761
|
var fromAltAudio = this.altAudio === 2;
|
20757
|
-
var altAudio =
|
20762
|
+
var altAudio = useAlternateAudio(data.url, hls);
|
20758
20763
|
// if we switch on main audio, ensure that main fragment scheduling is synced with media.buffered
|
20759
20764
|
// don't do anything if we switch to alt audio: audio stream controller is handling it.
|
20760
20765
|
// we will just have to change buffer scheduling on audioTrackSwitched
|
@@ -20777,7 +20782,6 @@
|
|
20777
20782
|
// Reset audio transmuxer so when switching back to main audio we're not still appending where we left off
|
20778
20783
|
this.resetTransmuxer();
|
20779
20784
|
}
|
20780
|
-
var hls = this.hls;
|
20781
20785
|
// If switching from alt to main audio, flush all audio and trigger track switched
|
20782
20786
|
if (fromAltAudio) {
|
20783
20787
|
hls.trigger(Events.BUFFER_FLUSHING, {
|
@@ -20793,8 +20797,7 @@
|
|
20793
20797
|
}
|
20794
20798
|
};
|
20795
20799
|
_proto.onAudioTrackSwitched = function onAudioTrackSwitched(event, data) {
|
20796
|
-
var
|
20797
|
-
var altAudio = !!this.hls.audioTracks[trackId].url;
|
20800
|
+
var altAudio = useAlternateAudio(data.url, this.hls);
|
20798
20801
|
if (altAudio) {
|
20799
20802
|
var videoBuffer = this.videoBuffer;
|
20800
20803
|
// if we switched on alternate audio, ensure that main fragment scheduling is synced with video sourcebuffer buffered
|