mirror of
https://gh-proxy.org/https://github.com/tiajinsha/JKVideo
synced 2026-07-07 23:18:38 +08:00
feat: unlock 1080P+ on Android via DASH streaming
- getPlayUrl uses fnval=16 (DASH) on Android, keeping fnval=0/html5 for iOS/web - New utils/dash.ts builds a valid DASH MPD from Bilibili's segmentBase ranges and returns it as a data: URI for ExoPlayer consumption - NativeVideoPlayer selects DASH path (type='mpd') or durl fallback automatically - Extend PlayUrlResponse types with DashVideoItem/DashAudioItem/DashSegmentBase
This commit is contained in:
@@ -34,6 +34,32 @@ export interface Comment {
|
||||
replies: Comment[] | null;
|
||||
}
|
||||
|
||||
export interface DashSegmentBase {
|
||||
Initialization: string;
|
||||
indexRange: string;
|
||||
}
|
||||
|
||||
export interface DashVideoItem {
|
||||
id: number;
|
||||
baseUrl: string;
|
||||
bandwidth: number;
|
||||
mimeType: string;
|
||||
codecs: string;
|
||||
width: number;
|
||||
height: number;
|
||||
frameRate: string;
|
||||
segmentBase: DashSegmentBase;
|
||||
}
|
||||
|
||||
export interface DashAudioItem {
|
||||
id: number;
|
||||
baseUrl: string;
|
||||
bandwidth: number;
|
||||
mimeType: string;
|
||||
codecs: string;
|
||||
segmentBase: DashSegmentBase;
|
||||
}
|
||||
|
||||
export interface PlayUrlResponse {
|
||||
durl?: Array<{
|
||||
url: string;
|
||||
@@ -41,8 +67,9 @@ export interface PlayUrlResponse {
|
||||
size: number;
|
||||
}>;
|
||||
dash?: {
|
||||
video: Array<{ id: number; baseUrl: string; codecs: string; bandwidth: number }>;
|
||||
audio: Array<{ id: number; baseUrl: string; codecs: string; bandwidth: number }>;
|
||||
duration: number;
|
||||
video: DashVideoItem[];
|
||||
audio: DashAudioItem[];
|
||||
};
|
||||
quality: number;
|
||||
accept_quality: number[];
|
||||
@@ -53,3 +80,16 @@ 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[];
|
||||
}
|
||||
|
||||
export interface HeatmapResponse {
|
||||
timestamp: number;
|
||||
pb_data: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user