Pretty Code + Music property added in YouTube Video

This commit is contained in:
killer069
2022-01-03 15:59:32 +05:30
parent 433ec4976b
commit ffbe882037
9 changed files with 78 additions and 39 deletions

View File

@@ -83,7 +83,7 @@ export async function stream_from_info(
else final.push(info.format[info.format.length - 1]);
let type: StreamType =
final[0].codec === 'opus' && final[0].container === 'webm' ? StreamType.WebmOpus : StreamType.Arbitrary;
await request_stream(`https://${new URL(final[0].url).host}/generate_204`)
await request_stream(`https://${new URL(final[0].url).host}/generate_204`);
if (options.seek) {
if (type === StreamType.WebmOpus) {
if (options.seek >= info.video_details.durationInSec || options.seek <= 0)