Update download method
All checks were successful
Bump deps (only minor versions) / ci (push) Successful in 18s
All checks were successful
Bump deps (only minor versions) / ci (push) Successful in 18s
This commit is contained in:
parent
08578eef0b
commit
5bcbfc70ec
5 changed files with 31 additions and 28 deletions
|
@ -14,7 +14,7 @@
|
|||
let disabled = $state(true);
|
||||
let metadata = $state(false);
|
||||
let logs = $state('');
|
||||
let downloadManager: DownloadManager|null = null;
|
||||
let downloadManager: DownloadManager | null = null;
|
||||
|
||||
const formats = Object.keys(supportedFormats).map((f) => {
|
||||
return { value: f, label: f.toUpperCase() };
|
||||
|
@ -29,13 +29,13 @@
|
|||
};
|
||||
|
||||
const dismiss = () => {
|
||||
unmount(downloadManager)
|
||||
}
|
||||
unmount(downloadManager);
|
||||
};
|
||||
|
||||
const onClick = async (evt) => {
|
||||
evt.preventDefault();
|
||||
|
||||
const props = $state( { url: href });
|
||||
const props = $state({ url: href });
|
||||
downloadManager = mount(DownloadManager, { target: document.body, props, events: { dismiss } });
|
||||
|
||||
link = '';
|
||||
|
|
|
@ -54,7 +54,6 @@ export const GET: RequestHandler = async ({ url }) => {
|
|||
logger.error('Error fetching metadata:');
|
||||
throw error(500, 'Failed to fetch video metadata');
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
// Stream video/audio
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue