YouTube finally Completed

This commit is contained in:
killer069
2021-08-16 17:37:44 +05:30
parent d3893e7636
commit 25627526b2
7 changed files with 516 additions and 268 deletions

View File

@@ -1,5 +1,5 @@
import got from "got"
import { video_info } from "."
import { Stream, stream as yt_stream } from "../Stream/stream"
interface FilterOptions {
@@ -44,7 +44,7 @@ function parseFormats(formats : any[]): { audio: any[], video:any[] } {
function filter_songs(formats : any[], options : FilterOptions) {
}
export async function stream(url : string, options? : StreamOptions): Promise<Stream>{
export async function stream(url : string, options? : StreamOptions){
let info = await video_info(url)
let final: any[] = [];
@@ -83,5 +83,5 @@ export async function stream(url : string, options? : StreamOptions): Promise<St
final.push(info.format[info.format.length - 1])
}
return yt_stream(final[0].url)
return got.stream(final[0].url)
}