mirror of
https://github.com/A-Star100/simpliplay-desktop.git
synced 2025-09-17 22:29:38 +00:00
Update renderer.js
This commit is contained in:
parent
a9dbe464d6
commit
90c3b55876
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user