replace got with undici

might as well since it already comes with youtubei.js
This commit is contained in:
dumbmoron
2023-08-20 14:44:34 +00:00
parent 244357820d
commit 814bfa404a
3 changed files with 12 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
import { streamAudioOnly, streamDefault, streamLiveRender, streamVideoOnly } from "./types.js";
export default function(res, streamInfo) {
export default async function(res, streamInfo) {
try {
if (streamInfo.isAudioOnly && streamInfo.type !== "bridge") {
streamAudioOnly(streamInfo, res);
@@ -8,14 +8,14 @@ export default function(res, streamInfo) {
}
switch (streamInfo.type) {
case "render":
streamLiveRender(streamInfo, res);
await streamLiveRender(streamInfo, res);
break;
case "videoM3U8":
case "mute":
streamVideoOnly(streamInfo, res);
break;
default:
streamDefault(streamInfo, res);
await streamDefault(streamInfo, res);
break;
}
} catch (e) {