backend and frontend: support out of order chunks + now it's performant on chrome
This commit is contained in:
@@ -1,51 +1,30 @@
|
||||
//Setup {
|
||||
// video_format: VideoFormat,
|
||||
// width: u64,
|
||||
// height: u64,
|
||||
// redraw_rate: u64,
|
||||
// dr_flags: i32,
|
||||
//},
|
||||
//DecodeUnit {
|
||||
// frame_number: u64,
|
||||
// frame_type: FrameType,
|
||||
|
||||
// host_processing_latency: u16,
|
||||
// receieve_time_ms: u64,
|
||||
// enqueue_time_ms: u64,
|
||||
// presentation_time: u64,
|
||||
|
||||
// full_length: usize,
|
||||
// //buffers: Vec<Buffer>,
|
||||
// buffer: Buffer,
|
||||
// index: u64,
|
||||
|
||||
// hdr_active: bool,
|
||||
// colorspace: u8,
|
||||
//},
|
||||
|
||||
|
||||
type StreamData = {
|
||||
Url: string,
|
||||
CertHash: Array<number>,
|
||||
Width: number,
|
||||
Height: number,
|
||||
}
|
||||
|
||||
export async function getStreamData(appId: number, server_name: string): Promise<StreamData> {
|
||||
try {
|
||||
// Create the POST request payload
|
||||
const width = 1920;
|
||||
const height = 1080;
|
||||
|
||||
const payload = {
|
||||
id: appId,
|
||||
server: server_name,
|
||||
server_mode: {
|
||||
fps: 60,
|
||||
width: 1920,
|
||||
height: 1080,
|
||||
width: width,
|
||||
height: height,
|
||||
},
|
||||
stream_config: {
|
||||
bitrate_kbps: 1024 * 10 * 2,
|
||||
bitrate_kbps: 1024 * 10 * 5,
|
||||
mode: {
|
||||
fps: 60,
|
||||
width: 1920,
|
||||
height: 1080,
|
||||
width: width,
|
||||
height: height,
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -66,7 +45,7 @@ export async function getStreamData(appId: number, server_name: string): Promise
|
||||
const streamDataResp = await response.json();
|
||||
console.log('Stream started:', streamDataResp);
|
||||
|
||||
let streamData: StreamData = { Url: streamDataResp.url, CertHash: streamDataResp.cert_hash };
|
||||
let streamData: StreamData = { Url: streamDataResp.url, CertHash: streamDataResp.cert_hash, Width: width, Height: height };
|
||||
return streamData;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user