Cookies Header function added

This commit is contained in:
killer069
2021-11-01 15:32:51 +05:30
parent 5214250eac
commit 703e36c78d
7 changed files with 24 additions and 13 deletions

View File

@@ -13,7 +13,7 @@ export enum StreamType {
export interface StreamOptions {
quality?: number;
proxy?: Proxy[];
htmldata? : boolean
htmldata?: boolean;
}
export interface InfoData {
@@ -54,7 +54,7 @@ export type YouTubeStream = Stream | LiveStreaming;
* @returns Stream class with type and stream for playing.
*/
export async function stream(url: string, options: StreamOptions = {}): Promise<YouTubeStream> {
const info = await video_info(url, { proxy: options.proxy, htmldata : options.htmldata });
const info = await video_info(url, { proxy: options.proxy, htmldata: options.htmldata });
const final: any[] = [];
if (
info.LiveStreamData.isLive === true &&