api/youtube: add an option to use HLS streams

- added `youtubeHLS` variable to api
- added youtube HLS parsing & handling
This commit is contained in:
wukko
2024-10-28 15:17:54 +06:00
parent 24ae08b105
commit c9eefc4d55
5 changed files with 171 additions and 57 deletions

View File

@@ -97,13 +97,14 @@ export default async function({ host, patternMatch, params }) {
case "youtube":
let fetchInfo = {
dispatcher,
id: patternMatch.id.slice(0, 11),
quality: params.videoQuality,
format: params.youtubeVideoCodec,
isAudioOnly,
isAudioMuted,
dubLang: params.youtubeDubLang,
dispatcher
youtubeHLS: params.youtubeHLS,
}
if (url.hostname === "music.youtube.com" || isAudioOnly) {