mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
Update web/src/lib/components/asset-viewer/VideoNativeViewer.svelte
Co-authored-by: Mees Frensel <33722705+meesfrensel@users.noreply.github.com>
This commit is contained in:
@@ -177,7 +177,6 @@
|
|||||||
api.on(Hls.Events.FRAG_LOADED, () => (rebuildCount = 0));
|
api.on(Hls.Events.FRAG_LOADED, () => (rebuildCount = 0));
|
||||||
|
|
||||||
api.on(Hls.Events.ERROR, (_, data) => {
|
api.on(Hls.Events.ERROR, (_, data) => {
|
||||||
console.error('HLS error', JSON.stringify(data));
|
|
||||||
// 404 on a fragment can mean the server-side session has expired. Refetch
|
// 404 on a fragment can mean the server-side session has expired. Refetch
|
||||||
// master for a new session, but give up if it still 404s.
|
// master for a new session, but give up if it still 404s.
|
||||||
if (
|
if (
|
||||||
@@ -186,8 +185,10 @@
|
|||||||
data.response?.code !== 404 ||
|
data.response?.code !== 404 ||
|
||||||
rebuildCount++ >= MAX_REBUILDS
|
rebuildCount++ >= MAX_REBUILDS
|
||||||
) {
|
) {
|
||||||
|
console.error('HLS error', JSON.stringify(data));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
console.warn('Error loading segment, starting new session');
|
||||||
activeSession = undefined;
|
activeSession = undefined;
|
||||||
resumeTime = el.currentTime;
|
resumeTime = el.currentTime;
|
||||||
el.load();
|
el.load();
|
||||||
|
|||||||
Reference in New Issue
Block a user