mirror of
https://github.com/A-Star100/simpliplay-desktop.git
synced 2025-09-17 22:29:38 +00:00
Update player.js
This commit is contained in:
parent
117d2950ea
commit
b987f539f8
@ -272,6 +272,7 @@ const { isHLS, isDASH } = await detectStreamType(url);
|
||||
|
||||
|
||||
let previousObjectURL = null; // Store the last Object URL
|
||||
window.objectURL = previousObjectURL
|
||||
|
||||
fileInput.addEventListener('change', (event) => {
|
||||
if (hls !== null) {
|
||||
@ -292,6 +293,12 @@ const { isHLS, isDASH } = await detectStreamType(url);
|
||||
// Revoke the previous Object URL if it exists
|
||||
if (previousObjectURL) {
|
||||
URL.revokeObjectURL(previousObjectURL);
|
||||
window.objectURL = previousObjectURL
|
||||
}
|
||||
|
||||
// Revoke previous file picker Object URL
|
||||
if (window.previousDropURL) {
|
||||
URL.revokeObjectURL(window.previousDropURL);
|
||||
}
|
||||
|
||||
// Create a new Object URL for the selected file
|
||||
|
Loading…
Reference in New Issue
Block a user