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.js
CHANGED
@@ -644,7 +644,7 @@
|
|
644
644
|
// Some browsers don't allow to use bind on console object anyway
|
645
645
|
// fallback to default if needed
|
646
646
|
try {
|
647
|
-
newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.7-0.canary.
|
647
|
+
newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.7-0.canary.10022");
|
648
648
|
} catch (e) {
|
649
649
|
/* log fn threw an exception. All logger methods are no-ops. */
|
650
650
|
return createLogger();
|
@@ -10743,7 +10743,9 @@
|
|
10743
10743
|
this.log('Reset loading state');
|
10744
10744
|
this.fragCurrent = null;
|
10745
10745
|
this.fragPrevious = null;
|
10746
|
-
this.state
|
10746
|
+
if (this.state !== State.STOPPED) {
|
10747
|
+
this.state = State.IDLE;
|
10748
|
+
}
|
10747
10749
|
};
|
10748
10750
|
_proto.resetStartWhenNotLoaded = function resetStartWhenNotLoaded(level) {
|
10749
10751
|
// if loadedmetadata is not set, it means that first frag request failed
|
@@ -17291,7 +17293,9 @@
|
|
17291
17293
|
this.fragmentTracker.removeFragment(waitingData.frag);
|
17292
17294
|
this.waitingData = null;
|
17293
17295
|
this.waitingVideoCC = -1;
|
17294
|
-
this.state
|
17296
|
+
if (this.state !== State.STOPPED) {
|
17297
|
+
this.state = State.IDLE;
|
17298
|
+
}
|
17295
17299
|
}
|
17296
17300
|
};
|
17297
17301
|
_proto.resetLoadingState = function resetLoadingState() {
|
@@ -17424,26 +17428,25 @@
|
|
17424
17428
|
this.removeUnbufferedFrags(fragCurrent.start);
|
17425
17429
|
}
|
17426
17430
|
this.resetLoadingState();
|
17427
|
-
// destroy useless transmuxer when switching audio to main
|
17428
|
-
if (!altAudio) {
|
17429
|
-
this.resetTransmuxer();
|
17430
|
-
} else {
|
17431
|
-
// switching to audio track, start timer if not already started
|
17432
|
-
this.setInterval(TICK_INTERVAL$2);
|
17433
|
-
}
|
17434
17431
|
|
17435
17432
|
// should we switch tracks ?
|
17436
17433
|
if (altAudio) {
|
17437
17434
|
this.switchingTrack = data;
|
17438
17435
|
// main audio track are handled by stream-controller, just do something if switching to alt audio track
|
17439
|
-
this.state = State.IDLE;
|
17440
17436
|
this.flushAudioIfNeeded(data);
|
17437
|
+
if (this.state !== State.STOPPED) {
|
17438
|
+
// switching to audio track, start timer if not already started
|
17439
|
+
this.setInterval(TICK_INTERVAL$2);
|
17440
|
+
this.state = State.IDLE;
|
17441
|
+
this.tick();
|
17442
|
+
}
|
17441
17443
|
} else {
|
17444
|
+
// destroy useless transmuxer when switching audio to main
|
17445
|
+
this.resetTransmuxer();
|
17442
17446
|
this.switchingTrack = null;
|
17443
17447
|
this.bufferedTrack = data;
|
17444
|
-
this.
|
17448
|
+
this.clearInterval();
|
17445
17449
|
}
|
17446
|
-
this.tick();
|
17447
17450
|
};
|
17448
17451
|
_proto.onManifestLoading = function onManifestLoading() {
|
17449
17452
|
this.fragmentTracker.removeAllFragments();
|
@@ -18342,7 +18345,7 @@
|
|
18342
18345
|
} else {
|
18343
18346
|
this.mediaBuffer = null;
|
18344
18347
|
}
|
18345
|
-
if (currentTrack) {
|
18348
|
+
if (currentTrack && this.state !== State.STOPPED) {
|
18346
18349
|
this.setInterval(TICK_INTERVAL$1);
|
18347
18350
|
}
|
18348
18351
|
}
|
@@ -23251,7 +23254,7 @@
|
|
23251
23254
|
hls.logger.log("Setting autoLevelCapping to " + maxLevel + ": " + levels[maxLevel].height + "p@" + levels[maxLevel].bitrate + " for media " + this.mediaWidth + "x" + this.mediaHeight);
|
23252
23255
|
}
|
23253
23256
|
hls.autoLevelCapping = maxLevel;
|
23254
|
-
if (hls.autoLevelCapping > this.autoLevelCapping && this.streamController) {
|
23257
|
+
if (hls.autoLevelEnabled && hls.autoLevelCapping > this.autoLevelCapping && this.streamController) {
|
23255
23258
|
// if auto level capping has a higher value for the previous one, flush the buffer using nextLevelSwitch
|
23256
23259
|
// usually happen when the user go to the fullscreen mode.
|
23257
23260
|
this.streamController.nextLevelSwitch();
|
@@ -30217,7 +30220,7 @@
|
|
30217
30220
|
* Get the video-dev/hls.js package version.
|
30218
30221
|
*/
|
30219
30222
|
function get() {
|
30220
|
-
return "1.5.7-0.canary.
|
30223
|
+
return "1.5.7-0.canary.10022";
|
30221
30224
|
}
|
30222
30225
|
}, {
|
30223
30226
|
key: "Events",
|
package/dist/hls.js.d.ts
CHANGED
@@ -121,17 +121,17 @@ export declare class AudioStreamController extends BaseStreamController implemen
|
|
121
121
|
protected resetLoadingState(): void;
|
122
122
|
protected onTickEnd(): void;
|
123
123
|
private doTickIdle;
|
124
|
-
onMediaDetaching(): void;
|
125
|
-
onAudioTracksUpdated
|
126
|
-
onAudioTrackSwitching
|
127
|
-
onManifestLoading(): void;
|
128
|
-
onLevelLoaded
|
129
|
-
onAudioTrackLoaded
|
124
|
+
protected onMediaDetaching(): void;
|
125
|
+
private onAudioTracksUpdated;
|
126
|
+
private onAudioTrackSwitching;
|
127
|
+
protected onManifestLoading(): void;
|
128
|
+
private onLevelLoaded;
|
129
|
+
private onAudioTrackLoaded;
|
130
130
|
_handleFragmentLoadProgress(data: FragLoadedData): void;
|
131
131
|
protected _handleFragmentLoadComplete(fragLoadedData: FragLoadedData): void;
|
132
|
-
onBufferReset
|
133
|
-
onBufferCreated
|
134
|
-
onFragBuffered
|
132
|
+
private onBufferReset;
|
133
|
+
private onBufferCreated;
|
134
|
+
private onFragBuffered;
|
135
135
|
protected onError(event: Events.ERROR, data: ErrorData): void;
|
136
136
|
private onBufferFlushing;
|
137
137
|
private onBufferFlushed;
|
@@ -2762,11 +2762,6 @@ declare class StyledUnicodeChar {
|
|
2762
2762
|
isEmpty(): boolean;
|
2763
2763
|
}
|
2764
2764
|
|
2765
|
-
declare interface SubtitleFragProcessed {
|
2766
|
-
success: boolean;
|
2767
|
-
frag: Fragment;
|
2768
|
-
}
|
2769
|
-
|
2770
2765
|
export declare interface SubtitleFragProcessedData {
|
2771
2766
|
success: boolean;
|
2772
2767
|
frag: Fragment;
|
@@ -2794,16 +2789,16 @@ export declare class SubtitleStreamController extends BaseStreamController imple
|
|
2794
2789
|
protected registerListeners(): void;
|
2795
2790
|
protected unregisterListeners(): void;
|
2796
2791
|
startLoad(startPosition: number): void;
|
2797
|
-
onManifestLoading(): void;
|
2798
|
-
onMediaDetaching(): void;
|
2799
|
-
onLevelLoaded
|
2800
|
-
onSubtitleFragProcessed
|
2801
|
-
onBufferFlushing
|
2802
|
-
onFragBuffered
|
2803
|
-
onError(event: Events.ERROR, data: ErrorData): void;
|
2804
|
-
onSubtitleTracksUpdated
|
2805
|
-
onSubtitleTrackSwitch
|
2806
|
-
onSubtitleTrackLoaded
|
2792
|
+
protected onManifestLoading(): void;
|
2793
|
+
protected onMediaDetaching(): void;
|
2794
|
+
private onLevelLoaded;
|
2795
|
+
private onSubtitleFragProcessed;
|
2796
|
+
private onBufferFlushing;
|
2797
|
+
private onFragBuffered;
|
2798
|
+
protected onError(event: Events.ERROR, data: ErrorData): void;
|
2799
|
+
private onSubtitleTracksUpdated;
|
2800
|
+
private onSubtitleTrackSwitch;
|
2801
|
+
private onSubtitleTrackLoaded;
|
2807
2802
|
_handleFragmentLoadComplete(fragLoadedData: FragLoadedData): void;
|
2808
2803
|
doTick(): void;
|
2809
2804
|
protected loadFragment(frag: Fragment, level: Level, targetBufferTime: number): void;
|
@@ -3043,10 +3038,6 @@ export declare interface TrackSet {
|
|
3043
3038
|
audiovideo?: Track;
|
3044
3039
|
}
|
3045
3040
|
|
3046
|
-
declare interface TrackSwitchedData {
|
3047
|
-
id: number;
|
3048
|
-
}
|
3049
|
-
|
3050
3041
|
declare class TransmuxerInterface {
|
3051
3042
|
error: Error | null;
|
3052
3043
|
private hls;
|