File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -221,6 +221,7 @@ class ScreenObtainer {
221221 */
222222 private _getAudioConstraints ( ) : boolean | IAudioQuality {
223223 const { audioQuality } = this . options ;
224+ const isTestModeEnabled = this . options . testing ?. testMode ;
224225
225226 // Chrome 140+ requires 'restrictOwnAudio' for proper audio sharing when not using stereo.
226227 // Starting Chrome 137 'echoCancellation' was turned off by default for screen share audio and needs to be
@@ -243,9 +244,9 @@ class ScreenObtainer {
243244
244245 let audio : boolean | IAudioQuality = ( audioQuality ?. stereo || needsEchoCancellation )
245246 ? defaultAudioConstraints
246- : true ;
247+ : ! isTestModeEnabled ;
247248
248- if ( supportsRestrictOwnAudio ) {
249+ if ( supportsRestrictOwnAudio && ! isTestModeEnabled ) {
249250 if ( typeof audio === 'boolean' ) {
250251 audio = {
251252 restrictOwnAudio : true
You can’t perform that action at this time.
0 commit comments