admin管理员组

文章数量:1122846

I want to set the specific microphone device in different Chrome, e.g. Chrome A using "Microphone A", Chrome B using "Microphone B". I know the Firefox can doing this using

profile.set_preference("media.default.audio_capture", "Microphone A")

However, I cannot find any information of this in Chrome. How to make it in Chrome using Python Selenium

I tried to using this but not working



prefs = {

    "profile.default_content_setting_values.media_stream_mic": 1,


"mediaDevices.defaultAudioInput": "Microphone A" 

}

I want to set the specific microphone device in different Chrome, e.g. Chrome A using "Microphone A", Chrome B using "Microphone B". I know the Firefox can doing this using

profile.set_preference("media.default.audio_capture", "Microphone A")

However, I cannot find any information of this in Chrome. How to make it in Chrome using Python Selenium

I tried to using this but not working



prefs = {

    "profile.default_content_setting_values.media_stream_mic": 1,


"mediaDevices.defaultAudioInput": "Microphone A" 

}
Share Improve this question asked Nov 21, 2024 at 12:12 wachan2001wachan2001 112 bronze badges 2
  • should be "media.default_audio_capture_device" See here: chromium.googlesource.com/chromium/src/+/… – browsermator Commented Nov 21, 2024 at 18:30
  • 1 @browsermator Yes you are right!, thank you so much

    本文标签: Python Selenium How to set the specific microphone device in different ChromeStack Overflow