diff --git a/play-dl/YouTube/stream.ts b/play-dl/YouTube/stream.ts index 2cffd42..ae40fdf 100644 --- a/play-dl/YouTube/stream.ts +++ b/play-dl/YouTube/stream.ts @@ -39,7 +39,7 @@ export async function stream(url : string): Promise{ +export function stream_from_info(info : InfoData): Stream | LiveStreaming | LiveEnded{ let final: any[] = []; let type : StreamType; if(info.LiveStreamData.isLive === true && info.LiveStreamData.hlsManifestUrl !== null) { - return await live_stream(info as InfoData) + return live_stream(info as InfoData) } let audioFormat = parseAudioFormats(info.format) @@ -97,7 +97,7 @@ function filterFormat(formats : any[], codec : string){ return result } -async function live_stream(info : InfoData): Promise{ +function live_stream(info : InfoData): LiveStreaming | LiveEnded{ let stream : LiveStreaming | LiveEnded if(info.video_details.durationInSec === '0') { stream = new LiveStreaming(info.LiveStreamData.dashManifestUrl, info.format[info.format.length - 1].targetDurationSec)