chore: update hls.js to latest version

This commit is contained in:
Christian Benincasa
2026-03-19 11:24:20 -04:00
parent 0c8a5b7aed
commit 8933b9873b
5 changed files with 15 additions and 9 deletions

10
pnpm-lock.yaml generated
View File

@@ -616,8 +616,8 @@ importers:
specifier: 'catalog:' specifier: 'catalog:'
version: 1.11.18 version: 1.11.18
hls.js: hls.js:
specifier: ^1.4.12 specifier: ^1.6.15
version: 1.4.12 version: 1.6.15
immer: immer:
specifier: ^10.0.3 specifier: ^10.0.3
version: 10.0.3 version: 10.0.3
@@ -6009,8 +6009,8 @@ packages:
highlight.js@10.7.3: highlight.js@10.7.3:
resolution: {integrity: sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==} resolution: {integrity: sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==}
hls.js@1.4.12: hls.js@1.6.15:
resolution: {integrity: sha512-1RBpx2VihibzE3WE9kGoVCtrhhDWTzydzElk/kyRbEOLnb1WIE+3ZabM/L8BqKFTCL3pUy4QzhXgD1Q6Igr1JA==} resolution: {integrity: sha512-E3a5VwgXimGHwpRGV+WxRTKeSp2DW5DI5MWv34ulL3t5UNmyJWCQ1KmLEHbYzcfThfXG8amBL+fCYPneGHC4VA==}
hoist-non-react-statics@3.3.2: hoist-non-react-statics@3.3.2:
resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==} resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==}
@@ -15101,7 +15101,7 @@ snapshots:
highlight.js@10.7.3: {} highlight.js@10.7.3: {}
hls.js@1.4.12: {} hls.js@1.6.15: {}
hoist-non-react-statics@3.3.2: hoist-non-react-statics@3.3.2:
dependencies: dependencies:

View File

@@ -107,6 +107,7 @@ export class FillerPickerV2 implements IFillerPicker {
fillerRepeatCooldownMs - timeSincePlayed; fillerRepeatCooldownMs - timeSincePlayed;
if (program.duration + timeUntilProgramCanPlay <= maxDuration) { if (program.duration + timeUntilProgramCanPlay <= maxDuration) {
minimumWait = Math.min(minimumWait, timeUntilProgramCanPlay); minimumWait = Math.min(minimumWait, timeUntilProgramCanPlay);
this.logger.trace('New minimumWait: %d', minimumWait);
} }
} else if (!pickedFiller) { } else if (!pickedFiller) {
// Need to see if we can even use this list. // Need to see if we can even use this list.
@@ -141,6 +142,7 @@ export class FillerPickerV2 implements IFillerPicker {
minimumWait, minimumWait,
program.duration + timeUntilListIsCandidate, program.duration + timeUntilListIsCandidate,
); );
this.logger.trace('New minimumWait: %d', minimumWait);
} }
// Cannot use this list because cooldown is in effect // Cannot use this list because cooldown is in effect
break; break;

View File

@@ -126,7 +126,6 @@ export class StreamProgramCalculator {
currentProgram.program.duration - currentProgram.timeElapsed; currentProgram.program.duration - currentProgram.timeElapsed;
const endTimeMs = req.startTime + maxDuration; const endTimeMs = req.startTime + maxDuration;
let streamDuration = maxDuration; let streamDuration = maxDuration;
console.log(maxDuration);
while (currentProgram.program.type === 'redirect') { while (currentProgram.program.type === 'redirect') {
redirectChannels.push(channelContext.uuid); redirectChannels.push(channelContext.uuid);
@@ -236,6 +235,7 @@ export class StreamProgramCalculator {
streamDuration, streamDuration,
channelContext, channelContext,
); );
this.logger.trace('Got lineup item: %O', lineupItem);
} }
await this.channelCache.recordPlayback( await this.channelCache.recordPlayback(
@@ -431,7 +431,7 @@ export class StreamProgramCalculator {
timeElapsed = Math.round(timeElapsed); timeElapsed = Math.round(timeElapsed);
if (program.type === 'error') { if (program.type === 'error') {
return { const item = {
type: 'error', type: 'error',
// title: 'Error', // title: 'Error',
error: program.error, error: program.error,
@@ -440,7 +440,9 @@ export class StreamProgramCalculator {
startOffset: 0, startOffset: 0,
// beginningOffset, // beginningOffset,
programBeginMs: program.programBeginMs, programBeginMs: program.programBeginMs,
}; } satisfies StreamLineupItem;
this.logger.trace('Playing error stream: %O', item);
return item;
} }
if (program.type === 'offline') { if (program.type === 'offline') {
@@ -468,6 +470,7 @@ export class StreamProgramCalculator {
fillerPrograms, fillerPrograms,
streamDuration, streamDuration,
); );
this.logger.trace('Got filler picker result: %O', randomResult);
filler = randomResult.filler; filler = randomResult.filler;
fillerListId = randomResult.fillerListId; fillerListId = randomResult.fillerListId;

View File

@@ -38,7 +38,7 @@
"color": "^5.0.0", "color": "^5.0.0",
"colorjs.io": "^0.5.2", "colorjs.io": "^0.5.2",
"dayjs": "catalog:", "dayjs": "catalog:",
"hls.js": "^1.4.12", "hls.js": "^1.6.15",
"immer": "^10.0.3", "immer": "^10.0.3",
"lodash-es": "catalog:", "lodash-es": "catalog:",
"material-react-table": "^3.2.1", "material-react-table": "^3.2.1",

View File

@@ -27,6 +27,7 @@ export const useHls = () => {
'http://localhost:5173', 'http://localhost:5173',
); );
}, },
debug: true, //import.meta.env.DEV,
}); });
newHls.on(Hls.Events.MANIFEST_PARSED, function (_, data) { newHls.on(Hls.Events.MANIFEST_PARSED, function (_, data) {