Stream fixes

This commit is contained in:
killer069
2021-08-24 12:50:06 +05:30
parent 5dd4122d9f
commit 6252494615
2 changed files with 90 additions and 10 deletions

View File

@@ -65,7 +65,7 @@ export async function stream(url : string, options : StreamOptions = { low_laten
final.push(info.format[info.format.length - 1])
}
return new Stream(final[0].url, type)
return new Stream(final[0].url, type, info.video_details.durationInSec)
}
export async function stream_from_info(info : InfoData, options : StreamOptions = { low_latency : false, preferred_quality : "144p" }): Promise<Stream | LiveStreaming | LiveEnded>{
@@ -94,7 +94,7 @@ export async function stream_from_info(info : InfoData, options : StreamOptions
final.push(info.format[info.format.length - 1])
}
return new Stream(final[0].url, type)
return new Stream(final[0].url, type, info.video_details.durationInSec)
}
function filterFormat(formats : any[], codec : string){