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
|
let previousObjectURL = null; // Store the last Object URL
|
||||||
|
window.objectURL = previousObjectURL
|
||||||
|
|
||||||
fileInput.addEventListener('change', (event) => {
|
fileInput.addEventListener('change', (event) => {
|
||||||
if (hls !== null) {
|
if (hls !== null) {
|
||||||
@ -292,7 +293,13 @@ const { isHLS, isDASH } = await detectStreamType(url);
|
|||||||
// Revoke the previous Object URL if it exists
|
// Revoke the previous Object URL if it exists
|
||||||
if (previousObjectURL) {
|
if (previousObjectURL) {
|
||||||
URL.revokeObjectURL(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
|
// Create a new Object URL for the selected file
|
||||||
const fileURL = URL.createObjectURL(file);
|
const fileURL = URL.createObjectURL(file);
|
||||||
|
Loading…
Reference in New Issue
Block a user