From 3259c9e6d30b979f51ae25a34acdbcc5c6bdb6a3 Mon Sep 17 00:00:00 2001 From: Jacopo Jannone Date: Sat, 22 Jan 2022 22:04:20 +0100 Subject: [PATCH] Use new endpoint for file download --- src/content.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/content.js b/src/content.js index 186750a..371f18d 100644 --- a/src/content.js +++ b/src/content.js @@ -83,17 +83,6 @@ function composeStreamURL(params) { return url; } -function composeDownloadURL(params, filename) { - const url = new URL("apis/download.do", params.host); - url.searchParams.set("recordingDir", params.recordingDir); - url.searchParams.set("timestamp", params.timestamp); - url.searchParams.set("token", params.token); - url.searchParams.set("fileName", filename); - - //return params.fallbackPlaySrc - return url; -} - function sanitizeFilename(filename) { const allowedChars = /[^\w\s\d\-_~,;\[\]\(\).]/g; return filename.replaceAll(allowedChars, "_"); @@ -154,7 +143,7 @@ function addDownloadButtonToPage(text, params) { const savename = `${sanitizeFilename(params.recordName)}.mp4`; // Compose the download link of the video - const downloadURL = composeDownloadURL(params, filename); + const downloadURL = params.fallbackPlaySrc; // Create the download button const downloadButton = createDownloadButton(downloadURL.toString(), savename);