mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Pause autoplay on external media removal
This commit is contained in:
@ -392,6 +392,11 @@ DOMPurify.addHook('uponSanitizeElement', (node, _, config) => {
|
||||
mediaBlocked = true;
|
||||
node.remove();
|
||||
}
|
||||
|
||||
if (mediaBlocked && (node instanceof HTMLMediaElement)) {
|
||||
node.autoplay = false;
|
||||
node.pause();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user