hls.js 1.5.2-0.canary.9969 → 1.5.2-0.canary.9970
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 +24 -20
- package/dist/hls.js.d.ts +7 -3
- package/dist/hls.js.map +1 -1
- package/dist/hls.light.js +20 -17
- 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 +20 -17
- 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 +24 -20
- 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 +4 -2
- package/src/controller/base-stream-controller.ts +9 -0
- package/src/controller/buffer-controller.ts +1 -0
- package/src/controller/stream-controller.ts +1 -1
- package/src/hls.ts +9 -14
- package/src/types/component-api.ts +2 -0
package/dist/hls.light.js
CHANGED
@@ -525,7 +525,7 @@
|
|
525
525
|
// Some browsers don't allow to use bind on console object anyway
|
526
526
|
// fallback to default if needed
|
527
527
|
try {
|
528
|
-
newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.2-0.canary.
|
528
|
+
newLogger.log("Debug logs enabled for \"" + context + "\" in hls.js version " + "1.5.2-0.canary.9970");
|
529
529
|
} catch (e) {
|
530
530
|
/* log fn threw an exception. All logger methods are no-ops. */
|
531
531
|
return createLogger();
|
@@ -7524,6 +7524,7 @@
|
|
7524
7524
|
_this2.resetBuffer(type);
|
7525
7525
|
});
|
7526
7526
|
this._initSourceBuffer();
|
7527
|
+
this.hls.resumeBuffering();
|
7527
7528
|
};
|
7528
7529
|
_proto.resetBuffer = function resetBuffer(type) {
|
7529
7530
|
var sb = this.sourceBuffer[type];
|
@@ -12294,6 +12295,7 @@
|
|
12294
12295
|
_this.startFragRequested = false;
|
12295
12296
|
_this.decrypter = void 0;
|
12296
12297
|
_this.initPTS = [];
|
12298
|
+
_this.buffering = true;
|
12297
12299
|
_this.onMediaSeeking = function () {
|
12298
12300
|
var _assertThisInitialize = _assertThisInitialized(_this),
|
12299
12301
|
config = _assertThisInitialize.config,
|
@@ -12397,6 +12399,12 @@
|
|
12397
12399
|
this.clearNextTick();
|
12398
12400
|
this.state = State.STOPPED;
|
12399
12401
|
};
|
12402
|
+
_proto.pauseBuffering = function pauseBuffering() {
|
12403
|
+
this.buffering = false;
|
12404
|
+
};
|
12405
|
+
_proto.resumeBuffering = function resumeBuffering() {
|
12406
|
+
this.buffering = true;
|
12407
|
+
};
|
12400
12408
|
_proto._streamEnded = function _streamEnded(bufferInfo, levelDetails) {
|
12401
12409
|
// If playlist is live, there is another buffered range after the current range, nothing buffered, media is detached,
|
12402
12410
|
// of nothing loading/loaded return false
|
@@ -19345,7 +19353,7 @@
|
|
19345
19353
|
if (this.altAudio && this.audioOnly) {
|
19346
19354
|
return;
|
19347
19355
|
}
|
19348
|
-
if (!(levels != null && levels[level])) {
|
19356
|
+
if (!this.buffering || !(levels != null && levels[level])) {
|
19349
19357
|
return;
|
19350
19358
|
}
|
19351
19359
|
var levelInfo = levels[level];
|
@@ -20323,7 +20331,6 @@
|
|
20323
20331
|
this.logger = void 0;
|
20324
20332
|
this.coreComponents = void 0;
|
20325
20333
|
this.networkControllers = void 0;
|
20326
|
-
this.started = false;
|
20327
20334
|
this._emitter = new EventEmitter();
|
20328
20335
|
this._autoLevelCapping = -1;
|
20329
20336
|
this._maxHdcpLevel = null;
|
@@ -20554,7 +20561,6 @@
|
|
20554
20561
|
startPosition = -1;
|
20555
20562
|
}
|
20556
20563
|
this.logger.log("startLoad(" + startPosition + ")");
|
20557
|
-
this.started = true;
|
20558
20564
|
this.networkControllers.forEach(function (controller) {
|
20559
20565
|
controller.startLoad(startPosition);
|
20560
20566
|
});
|
@@ -20565,33 +20571,30 @@
|
|
20565
20571
|
*/;
|
20566
20572
|
_proto.stopLoad = function stopLoad() {
|
20567
20573
|
this.logger.log('stopLoad');
|
20568
|
-
this.started = false;
|
20569
20574
|
this.networkControllers.forEach(function (controller) {
|
20570
20575
|
controller.stopLoad();
|
20571
20576
|
});
|
20572
20577
|
}
|
20573
20578
|
|
20574
20579
|
/**
|
20575
|
-
* Resumes stream controller segment loading
|
20580
|
+
* Resumes stream controller segment loading after `pauseBuffering` has been called.
|
20576
20581
|
*/;
|
20577
20582
|
_proto.resumeBuffering = function resumeBuffering() {
|
20578
|
-
|
20579
|
-
|
20580
|
-
|
20581
|
-
|
20582
|
-
|
20583
|
-
});
|
20584
|
-
}
|
20583
|
+
this.networkControllers.forEach(function (controller) {
|
20584
|
+
if (controller.resumeBuffering) {
|
20585
|
+
controller.resumeBuffering();
|
20586
|
+
}
|
20587
|
+
});
|
20585
20588
|
}
|
20586
20589
|
|
20587
20590
|
/**
|
20588
|
-
*
|
20591
|
+
* Prevents stream controller from loading new segments until `resumeBuffering` is called.
|
20589
20592
|
* This allows for media buffering to be paused without interupting playlist loading.
|
20590
20593
|
*/;
|
20591
20594
|
_proto.pauseBuffering = function pauseBuffering() {
|
20592
20595
|
this.networkControllers.forEach(function (controller) {
|
20593
|
-
if (
|
20594
|
-
controller.
|
20596
|
+
if (controller.pauseBuffering) {
|
20597
|
+
controller.pauseBuffering();
|
20595
20598
|
}
|
20596
20599
|
});
|
20597
20600
|
}
|
@@ -21148,7 +21151,7 @@
|
|
21148
21151
|
* Get the video-dev/hls.js package version.
|
21149
21152
|
*/
|
21150
21153
|
function get() {
|
21151
|
-
return "1.5.2-0.canary.
|
21154
|
+
return "1.5.2-0.canary.9970";
|
21152
21155
|
}
|
21153
21156
|
}, {
|
21154
21157
|
key: "Events",
|