Skip to content

Commit 75e8599

Browse files
committed
fix: update video and audio constraints
1 parent 706b610 commit 75e8599

4 files changed

Lines changed: 38 additions & 6 deletions

File tree

browser/src/App.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,12 @@ const App = () => {
7878
height: { ideal: resolution?.height || 1080 },
7979
frameRate: { ideal: 60 }
8080
},
81-
audio: true
81+
audio: {
82+
echoCancellation: false,
83+
noiseSuppression: false,
84+
autoGainControl: false,
85+
sampleRate: 48000,
86+
}
8287
});
8388
stream.getTracks().forEach((track) => track.stop());
8489

browser/src/libs/camera/index.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,20 @@ class Camera {
1717
deviceId: { exact: id },
1818
width: { ideal: width },
1919
height: { ideal: height },
20-
frameRate: { ideal: 60 }
20+
frameRate: { ideal: 60 },
21+
latency: { ideal: 0 },
22+
resizeMode: 'none'
2123
},
22-
audio: audioId ? { deviceId: { exact: audioId } } : false
24+
audio: audioId
25+
? {
26+
deviceId: { exact: audioId },
27+
echoCancellation: false,
28+
noiseSuppression: false,
29+
autoGainControl: false,
30+
sampleRate: 48000,
31+
latency: 0
32+
}
33+
: false
2334
};
2435

2536
this.id = id;

desktop/src/renderer/src/App.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,12 @@ const App = (): ReactElement => {
7575
height: { ideal: resolution?.height || 1080 },
7676
frameRate: { ideal: 60 }
7777
},
78-
audio: true
78+
audio: {
79+
echoCancellation: false,
80+
noiseSuppression: false,
81+
autoGainControl: false,
82+
sampleRate: 48000
83+
}
7984
})
8085
stream.getTracks().forEach((track) => track.stop())
8186
}

desktop/src/renderer/src/libs/camera/index.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,20 @@ class Camera {
1717
deviceId: { exact: id },
1818
width: { ideal: width },
1919
height: { ideal: height },
20-
frameRate: { ideal: 60 }
20+
frameRate: { ideal: 60 },
21+
latency: { ideal: 0 },
22+
resizeMode: 'none'
2123
},
22-
audio: audioId ? { deviceId: { exact: audioId } } : false
24+
audio: audioId
25+
? {
26+
deviceId: { exact: audioId },
27+
echoCancellation: false,
28+
noiseSuppression: false,
29+
autoGainControl: false,
30+
sampleRate: 48000,
31+
latency: 0
32+
}
33+
: false
2334
}
2435

2536
this.id = id

0 commit comments

Comments
 (0)