UNPKG

@bililive-tools/douyin-recorder

Version:
55 lines (54 loc) 1.29 kB
/** * 从抖音短链接解析得到直播间ID * @param shortURL 短链接,如 https://v.douyin.com/DpfoBLAXoHM/ * @returns webRoomId 直播间ID */ export declare function resolveShortURL(shortURL: string): Promise<string>; export declare const getCookie: () => Promise<string>; export declare function getRoomInfo(webRoomId: string, opts?: { retryOnSpecialCode?: boolean; auth?: string; doubleScreen?: boolean; }): Promise<{ living: boolean; roomId: string; owner: string; title: string; streams: StreamProfile[]; sources: SourceProfile[]; avatar: string; cover: string; liveId: string; }>; export interface StreamProfile { desc: string; key: string; bitRate: number; } export interface StreamInfo { quality: string; name: string; flv?: string; hls?: string; } export interface SourceProfile { name: string; streamMap: StreamData["data"]; streams: StreamInfo[]; } interface StreamData { common: unknown; data: Record<string, { main: { flv: string; hls: string; cmaf: string; dash: string; lls: string; tsl: string; tile: string; sdk_params: string; }; }>; } export {};