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

@@ -114,7 +114,7 @@ async function handleGenericStream(streamInfo, res) {
}
export function internalStream(streamInfo, res) {
if (streamInfo.service === 'youtube') {
if (streamInfo.service === 'youtube' && !streamInfo.isHLS) {
return handleYoutubeStream(streamInfo, res);
}