feat(server): add hls playlist hint (#29150)

* add playlist hint

* update api

* unused import

* update crf in tests
This commit is contained in:
Mert 2026-06-17 19:02:10 -04:00 committed by GitHub
parent cbe34d7931
commit 7ef2de6b53
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 153 additions and 22 deletions

View file

@ -4452,12 +4452,13 @@ export function endSession({ id, key, sessionId, slug }: {
/**
* Get HLS media playlist
*/
export function getMediaPlaylist({ id, key, sessionId, slug, variantIndex }: {
export function getMediaPlaylist({ id, key, sessionId, slug, variantIndex, xImmichHlsPos }: {
id: string;
key?: string;
sessionId: string;
slug?: string;
variantIndex: number;
xImmichHlsPos?: number;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchBlob<{
status: 200;
@ -4466,7 +4467,10 @@ export function getMediaPlaylist({ id, key, sessionId, slug, variantIndex }: {
key,
slug
}))}`, {
...opts
...opts,
headers: oazapfts.mergeHeaders(opts?.headers, {
"x-immich-hls-pos": xImmichHlsPos
})
}));
}
/**