INNER CODE UNIT · TypeScript

download

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

export function download(
    id: string,
    videoFrom: Format | "none",
    audioFrom: Format | "none", 
    downloadSubs: boolean,
    subLanguage: string, 
    subFormat: string
) { 
    let url = getDownloadLink(id, videoFrom, audioFrom);

    if (downloadSubs) {
        if (subLanguage == "live_chat") {
            subFormat = "json"
        }
        
        if (subFormat == "embed") {
            url += `&sl=${subLanguage}`;
        } else {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…