mirror of
https://gh-proxy.org/https://github.com/tiajinsha/JKVideo
synced 2026-07-08 07:28:37 +08:00
杜比HDR
This commit is contained in:
@@ -116,8 +116,10 @@ export async function getVideoDetail(bvid: string): Promise<VideoItem> {
|
||||
|
||||
export async function getPlayUrl(bvid: string, cid: number, qn = 64): Promise<PlayUrlResponse> {
|
||||
const isAndroid = Platform.OS === 'android';
|
||||
// 1488 = 16(DASH)|64(HDR)|128(4K)|256(杜比全景声)|1024(杜比视界)
|
||||
const FNVAL_ANDROID = 16 | 64 | 128 | 256 | 1024;
|
||||
const params = isAndroid
|
||||
? { bvid, cid, qn, fnval: 16, fourk: 1 }
|
||||
? { bvid, cid, qn, fnval: FNVAL_ANDROID, fourk: 1 }
|
||||
: { bvid, cid, qn, fnval: 0, platform: 'html5', fourk: 1 };
|
||||
const res = await api.get('/x/player/playurl', { params });
|
||||
return res.data.data as PlayUrlResponse;
|
||||
|
||||
@@ -69,6 +69,8 @@ export interface DashVideoItem {
|
||||
stat:any;
|
||||
frameRate: string;
|
||||
segment_base?: DashSegmentBase;
|
||||
dolby_type?: number; // 1=杜比视界
|
||||
hdr_type?: number; // 1=HDR
|
||||
}
|
||||
|
||||
export interface DashAudioItem {
|
||||
@@ -91,6 +93,10 @@ export interface PlayUrlResponse {
|
||||
video: DashVideoItem[];
|
||||
audio: DashAudioItem[];
|
||||
};
|
||||
dolby?: {
|
||||
type: number; // 1=杜比全景声
|
||||
audio?: DashAudioItem[];
|
||||
};
|
||||
quality: number;
|
||||
accept_quality: number[];
|
||||
accept_description: string[];
|
||||
|
||||
Reference in New Issue
Block a user