hls.js 1.5.13-0.canary.10403 → 1.5.13-0.canary.10404
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 +17 -8
- package/dist/hls.js.d.ts +1 -1
- package/dist/hls.js.map +1 -1
- package/dist/hls.light.js +17 -8
- 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 +17 -12
- 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 +17 -12
- package/dist/hls.mjs.map +1 -1
- package/dist/hls.worker.js +1 -1
- package/package.json +1 -1
- package/src/controller/base-stream-controller.ts +19 -7
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.
|
525
|
+
newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.13-0.canary.10404");
|
526
526
|
} catch (e) {
|
527
527
|
/* log fn threw an exception. All logger methods are no-ops. */
|
528
528
|
return createLogger();
|
@@ -10034,7 +10034,12 @@
|
|
10034
10034
|
if (media) {
|
10035
10035
|
// Remove gap fragments
|
10036
10036
|
_this.fragmentTracker.removeFragmentsInRange(currentTime, Infinity, _this.playlistType, true);
|
10037
|
-
|
10037
|
+
|
10038
|
+
// Don't set lastCurrentTime with backward seeks (allows for frag selection with strict tolerances)
|
10039
|
+
var lastCurrentTime = _this.lastCurrentTime;
|
10040
|
+
if (currentTime > lastCurrentTime) {
|
10041
|
+
_this.lastCurrentTime = currentTime;
|
10042
|
+
}
|
10038
10043
|
if (!_this.loadingParts) {
|
10039
10044
|
var bufferEnd = Math.max(bufferInfo.end, currentTime);
|
10040
10045
|
var shouldLoadParts = _this.shouldLoadParts(_this.getLevelDetails(), bufferEnd);
|
@@ -10734,14 +10739,16 @@
|
|
10734
10739
|
}
|
10735
10740
|
};
|
10736
10741
|
_proto.getFwdBufferInfo = function getFwdBufferInfo(bufferable, type) {
|
10742
|
+
var _this$media;
|
10737
10743
|
var pos = this.getLoadPosition();
|
10738
10744
|
if (!isFiniteNumber(pos)) {
|
10739
10745
|
return null;
|
10740
10746
|
}
|
10741
|
-
|
10747
|
+
var backwardSeek = this.lastCurrentTime > pos;
|
10748
|
+
var maxBufferHole = backwardSeek || (_this$media = this.media) != null && _this$media.paused ? 0 : this.config.maxBufferHole;
|
10749
|
+
return this.getFwdBufferInfoAtPos(bufferable, pos, type, maxBufferHole);
|
10742
10750
|
};
|
10743
|
-
_proto.getFwdBufferInfoAtPos = function getFwdBufferInfoAtPos(bufferable, pos, type) {
|
10744
|
-
var maxBufferHole = this.config.maxBufferHole;
|
10751
|
+
_proto.getFwdBufferInfoAtPos = function getFwdBufferInfoAtPos(bufferable, pos, type, maxBufferHole) {
|
10745
10752
|
var bufferInfo = BufferHelper.bufferInfo(bufferable, pos, maxBufferHole);
|
10746
10753
|
// Workaround flaw in getting forward buffer when maxBufferHole is smaller than gap at current pos
|
10747
10754
|
if (bufferInfo.len === 0 && bufferInfo.nextStart !== undefined) {
|
@@ -10837,7 +10844,7 @@
|
|
10837
10844
|
nextFragment = this.getNextFragment(this.nextLoadPosition, levelDetails);
|
10838
10845
|
if (nextFragment && !nextFragment.gap && bufferInfo.nextStart) {
|
10839
10846
|
// Media buffered after GAP tags should not make the next buffer timerange exceed forward buffer length
|
10840
|
-
var nextbufferInfo = this.getFwdBufferInfoAtPos(this.mediaBuffer ? this.mediaBuffer : this.media, bufferInfo.nextStart, playlistType);
|
10847
|
+
var nextbufferInfo = this.getFwdBufferInfoAtPos(this.mediaBuffer ? this.mediaBuffer : this.media, bufferInfo.nextStart, playlistType, 0);
|
10841
10848
|
if (nextbufferInfo !== null && bufferInfo.len + nextbufferInfo.len >= maxBufLen) {
|
10842
10849
|
// Returning here might result in not finding an audio and video candiate to skip to
|
10843
10850
|
var sn = nextFragment.sn;
|
@@ -10947,7 +10954,9 @@
|
|
10947
10954
|
}
|
10948
10955
|
var frag;
|
10949
10956
|
if (bufferEnd < end) {
|
10950
|
-
var
|
10957
|
+
var _this$media2;
|
10958
|
+
var backwardSeek = bufferEnd < this.lastCurrentTime;
|
10959
|
+
var lookupTolerance = backwardSeek || bufferEnd > end - maxFragLookUpTolerance || (_this$media2 = this.media) != null && _this$media2.paused ? 0 : maxFragLookUpTolerance;
|
10951
10960
|
// Remove the tolerance if it would put the bufferEnd past the actual end of stream
|
10952
10961
|
// Uses buffer and sequence number to calculate switch segment (required if using EXT-X-DISCONTINUITY-SEQUENCE)
|
10953
10962
|
frag = findFragmentByPTS(fragPrevious, fragments, bufferEnd, lookupTolerance);
|
@@ -30788,7 +30797,7 @@
|
|
30788
30797
|
* Get the video-dev/hls.js package version.
|
30789
30798
|
*/
|
30790
30799
|
function get() {
|
30791
|
-
return "1.5.13-0.canary.
|
30800
|
+
return "1.5.13-0.canary.10404";
|
30792
30801
|
}
|
30793
30802
|
}, {
|
30794
30803
|
key: "Events",
|
package/dist/hls.js.d.ts
CHANGED
@@ -300,7 +300,7 @@ export declare class BaseStreamController extends TaskLoop implements NetworkCom
|
|
300
300
|
protected bufferFragmentData(data: RemuxedTrack, frag: Fragment, part: Part | null, chunkMeta: ChunkMetadata, noBacktracking?: boolean): void;
|
301
301
|
protected flushBufferGap(frag: Fragment): void;
|
302
302
|
protected getFwdBufferInfo(bufferable: Bufferable | null, type: PlaylistLevelType): BufferInfo | null;
|
303
|
-
|
303
|
+
private getFwdBufferInfoAtPos;
|
304
304
|
protected getMaxBufferLength(levelBitrate?: number): number;
|
305
305
|
protected reduceMaxBufferLength(threshold: number, fragDuration: number): boolean;
|
306
306
|
protected getAppendedFrag(position: number, playlistType?: PlaylistLevelType): Fragment | null;
|