hls.js 1.6.6-0.canary.11354 → 1.6.6-0.canary.11356
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 +22 -16
- package/dist/hls.js.map +1 -1
- package/dist/hls.light.js +19 -15
- 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 +25 -21
- 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 +28 -22
- package/dist/hls.mjs.map +1 -1
- package/dist/hls.worker.js +1 -1
- package/package.json +2 -2
- package/src/controller/audio-stream-controller.ts +3 -1
- package/src/controller/buffer-controller.ts +12 -11
- package/src/controller/content-steering-controller.ts +6 -1
- package/src/controller/stream-controller.ts +3 -1
@@ -785,7 +785,7 @@ transfer tracks: ${stringify(transferredTracks, (key, value) => (key === 'initSe
|
|
785
785
|
}
|
786
786
|
|
787
787
|
// Block audio append until overlapping video append
|
788
|
-
const videoTrack =
|
788
|
+
const videoTrack = tracks.video;
|
789
789
|
const videoSb = videoTrack?.buffer;
|
790
790
|
if (videoSb && sn !== 'initSegment') {
|
791
791
|
const partOrFrag = part || (frag as MediaFragment);
|
@@ -828,15 +828,12 @@ transfer tracks: ${stringify(transferredTracks, (key, value) => (key === 'initSe
|
|
828
828
|
execute: () => {
|
829
829
|
chunkStats.executeStart = self.performance.now();
|
830
830
|
|
831
|
-
const
|
832
|
-
if (
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
} else if (offset !== undefined && Number.isFinite(offset)) {
|
838
|
-
this.updateTimestampOffset(sb, offset, 0.000001, type, sn, cc);
|
839
|
-
}
|
831
|
+
const sb = this.tracks[type]?.buffer;
|
832
|
+
if (sb) {
|
833
|
+
if (checkTimestampOffset) {
|
834
|
+
this.updateTimestampOffset(sb, fragStart, 0.1, type, sn, cc);
|
835
|
+
} else if (offset !== undefined && Number.isFinite(offset)) {
|
836
|
+
this.updateTimestampOffset(sb, offset, 0.000001, type, sn, cc);
|
840
837
|
}
|
841
838
|
}
|
842
839
|
this.appendExecutor(data, type);
|
@@ -892,7 +889,11 @@ transfer tracks: ${stringify(transferredTracks, (key, value) => (key === 'initSe
|
|
892
889
|
fatal: false,
|
893
890
|
};
|
894
891
|
const mediaError = this.media?.error;
|
895
|
-
if (
|
892
|
+
if (
|
893
|
+
(error as DOMException).code === DOMException.QUOTA_EXCEEDED_ERR ||
|
894
|
+
error.name == 'QuotaExceededError' ||
|
895
|
+
`quota` in error
|
896
|
+
) {
|
896
897
|
// QuotaExceededError: http://www.w3.org/TR/html5/infrastructure.html#quotaexceedederror
|
897
898
|
// let's stop appending any segments, and report BUFFER_FULL_ERROR error
|
898
899
|
event.details = ErrorDetails.BUFFER_FULL_ERROR;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { ErrorActionFlags, NetworkErrorAction } from './error-controller';
|
2
|
+
import { ErrorDetails } from '../errors';
|
2
3
|
import { Events } from '../events';
|
3
4
|
import { Level } from '../types/level';
|
4
5
|
import {
|
@@ -216,7 +217,11 @@ export default class ContentSteeringController
|
|
216
217
|
this.updatePathwayPriority(pathwayPriority);
|
217
218
|
errorAction.resolved = this.pathwayId !== errorPathway;
|
218
219
|
}
|
219
|
-
if (!
|
220
|
+
if (data.details === ErrorDetails.BUFFER_APPEND_ERROR && !data.fatal) {
|
221
|
+
// Error will become fatal in buffer-controller when reaching `appendErrorMaxRetry`
|
222
|
+
// Stream-controllers are expected to reduce buffer length even if this is not deemed a QuotaExceededError
|
223
|
+
errorAction.resolved = true;
|
224
|
+
} else if (!errorAction.resolved) {
|
220
225
|
this.warn(
|
221
226
|
`Could not resolve ${data.details} ("${
|
222
227
|
data.error.message
|
@@ -1053,7 +1053,9 @@ export default class StreamController
|
|
1053
1053
|
if (data.parent !== 'main') {
|
1054
1054
|
return;
|
1055
1055
|
}
|
1056
|
-
this.
|
1056
|
+
if (this.reduceLengthAndFlushBuffer(data)) {
|
1057
|
+
this.resetLoadingState();
|
1058
|
+
}
|
1057
1059
|
break;
|
1058
1060
|
case ErrorDetails.BUFFER_FULL_ERROR:
|
1059
1061
|
if (data.parent !== 'main') {
|