INNER CODE UNIT · TypeScript

_trigger_download

xcodian/youtube-dl-web · frontend/src/logic/download.ts:3

function _trigger_download(url: string) {
    const a = document.createElement('a')

    a.href = url
    a.download = ""

    document.body.appendChild(a)
    a.click()
    document.body.removeChild(a)
}

export function download(
    id: string,
    videoFrom: Format | "none",
    audioFrom: Format | "none", 
    downloadSubs: boolean,
    subLanguage: string, 
    subFormat: string

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…