From b987f539f8624b64401f568c7c4343562b7c8062 Mon Sep 17 00:00:00 2001 From: Anirudh Sevugan Date: Wed, 10 Sep 2025 21:08:09 -0500 Subject: [PATCH] Update player.js --- simpliplay/player.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/simpliplay/player.js b/simpliplay/player.js index 2c5ac9d..94deeff 100644 --- a/simpliplay/player.js +++ b/simpliplay/player.js @@ -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,7 +293,13 @@ 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 const fileURL = URL.createObjectURL(file);