2026-03-05 18:02:54 +08:00
|
|
|
|
export interface VideoItem {
|
|
|
|
|
|
bvid: string;
|
|
|
|
|
|
aid: number;
|
|
|
|
|
|
title: string;
|
|
|
|
|
|
pic: string;
|
|
|
|
|
|
owner: {
|
|
|
|
|
|
mid: number;
|
|
|
|
|
|
name: string;
|
|
|
|
|
|
face: string;
|
|
|
|
|
|
};
|
2026-03-10 19:22:38 +08:00
|
|
|
|
stat?: {
|
2026-03-05 18:02:54 +08:00
|
|
|
|
view: number;
|
|
|
|
|
|
danmaku: number;
|
|
|
|
|
|
reply: number;
|
|
|
|
|
|
like: number;
|
|
|
|
|
|
coin: number;
|
|
|
|
|
|
favorite: number;
|
2026-03-10 19:22:38 +08:00
|
|
|
|
} | null;
|
2026-03-05 18:02:54 +08:00
|
|
|
|
duration: number;
|
|
|
|
|
|
desc: string;
|
2026-03-10 19:22:38 +08:00
|
|
|
|
cid?: number;
|
2026-03-05 18:02:54 +08:00
|
|
|
|
pages?: Array<{ cid: number; part: string }>;
|
2026-03-13 21:52:09 +08:00
|
|
|
|
goto?: 'av' | 'live';
|
|
|
|
|
|
roomid?: number;
|
|
|
|
|
|
online?: number;
|
|
|
|
|
|
area_name?: string;
|
2026-03-05 18:02:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export interface Comment {
|
|
|
|
|
|
rpid: number;
|
|
|
|
|
|
content: { message: string };
|
|
|
|
|
|
member: {
|
|
|
|
|
|
uname: string;
|
|
|
|
|
|
avatar: string;
|
|
|
|
|
|
};
|
|
|
|
|
|
like: number;
|
|
|
|
|
|
ctime: number;
|
|
|
|
|
|
replies: Comment[] | null;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-10 20:04:48 +08:00
|
|
|
|
export interface DashSegmentBase {
|
2026-03-10 20:09:50 +08:00
|
|
|
|
initialization: string;
|
|
|
|
|
|
index_range: string;
|
2026-03-10 20:04:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export interface DashVideoItem {
|
|
|
|
|
|
id: number;
|
|
|
|
|
|
baseUrl: string;
|
|
|
|
|
|
bandwidth: number;
|
|
|
|
|
|
mimeType: string;
|
|
|
|
|
|
codecs: string;
|
|
|
|
|
|
width: number;
|
|
|
|
|
|
height: number;
|
2026-03-10 21:48:23 +08:00
|
|
|
|
stat:any;
|
2026-03-10 20:04:48 +08:00
|
|
|
|
frameRate: string;
|
2026-03-10 20:09:50 +08:00
|
|
|
|
segment_base?: DashSegmentBase;
|
2026-03-10 20:04:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export interface DashAudioItem {
|
|
|
|
|
|
id: number;
|
|
|
|
|
|
baseUrl: string;
|
|
|
|
|
|
bandwidth: number;
|
|
|
|
|
|
mimeType: string;
|
|
|
|
|
|
codecs: string;
|
2026-03-10 20:09:50 +08:00
|
|
|
|
segment_base?: DashSegmentBase;
|
2026-03-10 20:04:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-05 18:02:54 +08:00
|
|
|
|
export interface PlayUrlResponse {
|
2026-03-10 19:04:18 +08:00
|
|
|
|
durl?: Array<{
|
2026-03-05 18:02:54 +08:00
|
|
|
|
url: string;
|
|
|
|
|
|
length: number;
|
|
|
|
|
|
size: number;
|
|
|
|
|
|
}>;
|
2026-03-10 19:04:18 +08:00
|
|
|
|
dash?: {
|
2026-03-10 20:04:48 +08:00
|
|
|
|
duration: number;
|
|
|
|
|
|
video: DashVideoItem[];
|
|
|
|
|
|
audio: DashAudioItem[];
|
2026-03-10 19:04:18 +08:00
|
|
|
|
};
|
2026-03-05 18:02:54 +08:00
|
|
|
|
quality: number;
|
2026-03-10 19:04:18 +08:00
|
|
|
|
accept_quality: number[];
|
|
|
|
|
|
accept_description: string[];
|
2026-03-05 18:02:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export interface QRCodeInfo {
|
|
|
|
|
|
url: string;
|
|
|
|
|
|
qrcode_key: string;
|
|
|
|
|
|
}
|
2026-03-10 20:04:48 +08:00
|
|
|
|
|
|
|
|
|
|
export interface VideoShotData {
|
|
|
|
|
|
img_x_len: number;
|
|
|
|
|
|
img_y_len: number;
|
|
|
|
|
|
img_x_size: number;
|
|
|
|
|
|
img_y_size: number;
|
|
|
|
|
|
image: string[];
|
2026-03-16 12:55:45 +08:00
|
|
|
|
index: number[]; // frame index per second: index[t] = frame idx at second t
|
|
|
|
|
|
pvdata?: string;
|
2026-03-10 20:04:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-10 22:43:16 +08:00
|
|
|
|
export interface DanmakuItem {
|
|
|
|
|
|
time: number; // 秒(float),弹幕出现时间
|
|
|
|
|
|
mode: 1 | 4 | 5; // 1=滚动, 4=底部固定, 5=顶部固定
|
|
|
|
|
|
fontSize: number;
|
|
|
|
|
|
color: number; // 0xRRGGBB 十进制整数
|
|
|
|
|
|
text: string;
|
|
|
|
|
|
}
|
2026-03-13 21:52:09 +08:00
|
|
|
|
|
|
|
|
|
|
export interface LiveRoom {
|
|
|
|
|
|
roomid: number;
|
|
|
|
|
|
uid: number;
|
|
|
|
|
|
title: string;
|
|
|
|
|
|
uname: string;
|
|
|
|
|
|
face: string;
|
|
|
|
|
|
cover: string;
|
|
|
|
|
|
online: number;
|
|
|
|
|
|
area_name: string;
|
|
|
|
|
|
parent_area_name: string;
|
|
|
|
|
|
}
|