html data added in video_basic_info function

This commit is contained in:
killer069
2021-11-01 15:22:02 +05:30
parent 76ab060d57
commit 5214250eac
6 changed files with 39 additions and 30 deletions

View File

@@ -13,6 +13,7 @@ export enum StreamType {
export interface StreamOptions {
quality?: number;
proxy?: Proxy[];
htmldata? : boolean
}
export interface InfoData {
@@ -53,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 });
const info = await video_info(url, { proxy: options.proxy, htmldata : options.htmldata });
const final: any[] = [];
if (
info.LiveStreamData.isLive === true &&