Update renderer.js

This commit is contained in:
Anirudh Sevugan 2025-07-05 16:29:44 -05:00 committed by GitHub
parent a9dbe464d6
commit 90c3b55876
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -39,6 +39,14 @@ function isSafeURL(fileURL) {
window.electron.receive("play-media", (fileURL) => { window.electron.receive("play-media", (fileURL) => {
if (isSafeURL(fileURL)) { if (isSafeURL(fileURL)) {
clearSubtitles() clearSubtitles()
if (window.hls) {
window.hls.destroy()
window.hls = null
}
if (window.dash) {
window.dash.reset()
window.dash = null
}
loadMedia(fileURL); loadMedia(fileURL);
} else { } else {
console.warn("Blocked unsafe media URL:", fileURL); console.warn("Blocked unsafe media URL:", fileURL);