mirror of
https://github.com/HumanAIGC-Engineering/gradio-webrtc.git
synced 2026-02-05 18:09:23 +08:00
make code
This commit is contained in:
@@ -48,8 +48,6 @@ export async function start(stream, pc: RTCPeerConnection, node, server_fn, webr
|
||||
pc = createPeerConnection(pc, node);
|
||||
if (stream) {
|
||||
stream.getTracks().forEach((track) => {
|
||||
if(modality == "video") track.applyConstraints({ frameRate: { max: 30 } });
|
||||
else if(modality == "audio") track.applyConstraints({ sampleRate: 48000, channelCount: 1 });
|
||||
console.debug("Track stream callback", track);
|
||||
pc.addTrack(track, stream);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user