hls.js 1.5.7-0.canary.10020 → 1.5.7-0.canary.10022
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 +19 -16
- package/dist/hls.js.d.ts +19 -28
- package/dist/hls.js.map +1 -1
- package/dist/hls.light.js +6 -4
- 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 +6 -4
- 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 +19 -16
- package/dist/hls.mjs.map +1 -1
- package/dist/hls.worker.js +1 -1
- package/package.json +1 -1
- package/src/controller/audio-stream-controller.ts +27 -20
- package/src/controller/base-stream-controller.ts +3 -1
- package/src/controller/cap-level-controller.ts +1 -0
- package/src/controller/subtitle-stream-controller.ts +14 -11
package/dist/hls.mjs
CHANGED
@@ -512,7 +512,7 @@ function enableLogs(debugConfig, context, id) {
|
|
512
512
|
// Some browsers don't allow to use bind on console object anyway
|
513
513
|
// fallback to default if needed
|
514
514
|
try {
|
515
|
-
newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.5.7-0.canary.
|
515
|
+
newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.5.7-0.canary.10022"}`);
|
516
516
|
} catch (e) {
|
517
517
|
/* log fn threw an exception. All logger methods are no-ops. */
|
518
518
|
return createLogger();
|
@@ -10399,7 +10399,9 @@ class BaseStreamController extends TaskLoop {
|
|
10399
10399
|
this.log('Reset loading state');
|
10400
10400
|
this.fragCurrent = null;
|
10401
10401
|
this.fragPrevious = null;
|
10402
|
-
this.state
|
10402
|
+
if (this.state !== State.STOPPED) {
|
10403
|
+
this.state = State.IDLE;
|
10404
|
+
}
|
10403
10405
|
}
|
10404
10406
|
resetStartWhenNotLoaded(level) {
|
10405
10407
|
// if loadedmetadata is not set, it means that first frag request failed
|
@@ -16736,7 +16738,9 @@ class AudioStreamController extends BaseStreamController {
|
|
16736
16738
|
this.fragmentTracker.removeFragment(waitingData.frag);
|
16737
16739
|
this.waitingData = null;
|
16738
16740
|
this.waitingVideoCC = -1;
|
16739
|
-
this.state
|
16741
|
+
if (this.state !== State.STOPPED) {
|
16742
|
+
this.state = State.IDLE;
|
16743
|
+
}
|
16740
16744
|
}
|
16741
16745
|
}
|
16742
16746
|
resetLoadingState() {
|
@@ -16876,26 +16880,25 @@ class AudioStreamController extends BaseStreamController {
|
|
16876
16880
|
this.removeUnbufferedFrags(fragCurrent.start);
|
16877
16881
|
}
|
16878
16882
|
this.resetLoadingState();
|
16879
|
-
// destroy useless transmuxer when switching audio to main
|
16880
|
-
if (!altAudio) {
|
16881
|
-
this.resetTransmuxer();
|
16882
|
-
} else {
|
16883
|
-
// switching to audio track, start timer if not already started
|
16884
|
-
this.setInterval(TICK_INTERVAL$2);
|
16885
|
-
}
|
16886
16883
|
|
16887
16884
|
// should we switch tracks ?
|
16888
16885
|
if (altAudio) {
|
16889
16886
|
this.switchingTrack = data;
|
16890
16887
|
// main audio track are handled by stream-controller, just do something if switching to alt audio track
|
16891
|
-
this.state = State.IDLE;
|
16892
16888
|
this.flushAudioIfNeeded(data);
|
16889
|
+
if (this.state !== State.STOPPED) {
|
16890
|
+
// switching to audio track, start timer if not already started
|
16891
|
+
this.setInterval(TICK_INTERVAL$2);
|
16892
|
+
this.state = State.IDLE;
|
16893
|
+
this.tick();
|
16894
|
+
}
|
16893
16895
|
} else {
|
16896
|
+
// destroy useless transmuxer when switching audio to main
|
16897
|
+
this.resetTransmuxer();
|
16894
16898
|
this.switchingTrack = null;
|
16895
16899
|
this.bufferedTrack = data;
|
16896
|
-
this.
|
16900
|
+
this.clearInterval();
|
16897
16901
|
}
|
16898
|
-
this.tick();
|
16899
16902
|
}
|
16900
16903
|
onManifestLoading() {
|
16901
16904
|
this.fragmentTracker.removeAllFragments();
|
@@ -17812,7 +17815,7 @@ class SubtitleStreamController extends BaseStreamController {
|
|
17812
17815
|
} else {
|
17813
17816
|
this.mediaBuffer = null;
|
17814
17817
|
}
|
17815
|
-
if (currentTrack) {
|
17818
|
+
if (currentTrack && this.state !== State.STOPPED) {
|
17816
17819
|
this.setInterval(TICK_INTERVAL$1);
|
17817
17820
|
}
|
17818
17821
|
}
|
@@ -22686,7 +22689,7 @@ class CapLevelController {
|
|
22686
22689
|
hls.logger.log(`Setting autoLevelCapping to ${maxLevel}: ${levels[maxLevel].height}p@${levels[maxLevel].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`);
|
22687
22690
|
}
|
22688
22691
|
hls.autoLevelCapping = maxLevel;
|
22689
|
-
if (hls.autoLevelCapping > this.autoLevelCapping && this.streamController) {
|
22692
|
+
if (hls.autoLevelEnabled && hls.autoLevelCapping > this.autoLevelCapping && this.streamController) {
|
22690
22693
|
// if auto level capping has a higher value for the previous one, flush the buffer using nextLevelSwitch
|
22691
22694
|
// usually happen when the user go to the fullscreen mode.
|
22692
22695
|
this.streamController.nextLevelSwitch();
|
@@ -28713,7 +28716,7 @@ class Hls {
|
|
28713
28716
|
* Get the video-dev/hls.js package version.
|
28714
28717
|
*/
|
28715
28718
|
static get version() {
|
28716
|
-
return "1.5.7-0.canary.
|
28719
|
+
return "1.5.7-0.canary.10022";
|
28717
28720
|
}
|
28718
28721
|
|
28719
28722
|
/**
|