fix(inlineViewer): stops media when viewer is closed

This commit is contained in:
Edouard Vanbelle
2026-04-07 11:24:16 +02:00
parent 4a4f38c418
commit 29b01529da
+4
View File
@@ -502,6 +502,10 @@ class InlineViewer {
// Get modal
const modal = document.getElementById('inline-viewer-modal');
// stops audio/video before closing viewver
const media = modal.querySelector('audio, video');
if (media && !media.paused) media.pause();
// Hide modal
modal.classList.remove('active');