Files
JKVideo/services/types.ts
Developer 64ce3031a6 feat: merge danmaku-fullscreen - resolve NativeVideoPlayer conflict
Combines master's shotTimestamps/pvdata thumbnail improvements and
TouchableWithoutFeedback tap layer with feature/danmaku-fullscreen's
DanmakuItem import, DanmakuOverlay render, showDanmaku state,
onTimeUpdate/initialTime/danmakus/isFullscreen props, danmaku toggle
button, and useWindowDimensions for rotation-aware dimensions.
2026-03-11 10:07:22 +08:00

106 lines
1.9 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
export interface VideoItem {
bvid: string;
aid: number;
title: string;
pic: string;
owner: {
mid: number;
name: string;
face: string;
};
stat?: {
view: number;
danmaku: number;
reply: number;
like: number;
coin: number;
favorite: number;
} | null;
duration: number;
desc: string;
cid?: number;
pages?: Array<{ cid: number; part: string }>;
}
export interface Comment {
rpid: number;
content: { message: string };
member: {
uname: string;
avatar: string;
};
like: number;
ctime: number;
replies: Comment[] | null;
}
export interface DashSegmentBase {
initialization: string;
index_range: string;
}
export interface DashVideoItem {
id: number;
baseUrl: string;
bandwidth: number;
mimeType: string;
codecs: string;
width: number;
height: number;
stat:any;
frameRate: string;
segment_base?: DashSegmentBase;
}
export interface DashAudioItem {
id: number;
baseUrl: string;
bandwidth: number;
mimeType: string;
codecs: string;
segment_base?: DashSegmentBase;
}
export interface PlayUrlResponse {
durl?: Array<{
url: string;
length: number;
size: number;
}>;
dash?: {
duration: number;
video: DashVideoItem[];
audio: DashAudioItem[];
};
quality: number;
accept_quality: number[];
accept_description: string[];
}
export interface QRCodeInfo {
url: string;
qrcode_key: string;
}
export interface VideoShotData {
img_x_len: number;
img_y_len: number;
img_x_size: number;
img_y_size: number;
image: string[];
pvdata?: string; // base64 protobuf: packed float32 timestamps (seconds) per frame
}
export interface HeatmapResponse {
timestamp: number;
pb_data: string;
}
export interface DanmakuItem {
time: number; // 秒float弹幕出现时间
mode: 1 | 4 | 5; // 1=滚动, 4=底部固定, 5=顶部固定
fontSize: number;
color: number; // 0xRRGGBB 十进制整数
text: string;
}