diff --git a/src/_h5ai/public/js/lib/ext/preview/preview-aud.js b/src/_h5ai/public/js/lib/ext/preview/preview-aud.js index 904d265d..722272b1 100644 --- a/src/_h5ai/public/js/lib/ext/preview/preview-aud.js +++ b/src/_h5ai/public/js/lib/ext/preview/preview-aud.js @@ -24,6 +24,7 @@ const updateGui = () => { const addUnloadFn = el => { el.unload = () => { + el.pause(); el.src = ''; el.load(); }; diff --git a/src/_h5ai/public/js/lib/ext/preview/preview-vid.js b/src/_h5ai/public/js/lib/ext/preview/preview-vid.js index 04e21a03..4c0d5923 100644 --- a/src/_h5ai/public/js/lib/ext/preview/preview-vid.js +++ b/src/_h5ai/public/js/lib/ext/preview/preview-vid.js @@ -28,6 +28,7 @@ const updateGui = () => { const addUnloadFn = el => { el.unload = () => { + el.pause(); el.src = ''; el.load(); };