fix: on chrome129, a supported video that fails to fetch the cover wasn't playable #759
Massimo Melina committed
Oct 5, 2024 at 18:59 UTC
1110e124c9f288ba49fa34d2d68322178a393913
1 file changed
+2
frontend/src/show.ts
+2
@@ -217,6 +217,8 @@ export function fileShow(entry: DirEntry, { startPlaying=false } = {}) {
217
function goNext() { go(+1) }
218
219
function curFailed() {
220
+ const mediaError = (document.querySelector('.showing-container .showing') as any)?.error?.code // only presenti in video/audio elements
221
+ if (mediaError === 2) return // happens when chrome fails to fetch cover for videos. We don't skip the file for this reason. Tested on chrome129/windows
222
if (cur !== lastGood.current)
223
return go()
224
setLoading(false)