搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

How to fake a media device/stream similar to chrome's '--use-fake-device-for-media-stream'

  • 1 个回答
  • 1 人有此问题
  • 3 次查看
  • 最后回复者为 the-edmeister

more options

Hi,

I am developing a java/selenium based application and need to fake a microphone/cam and pass media i.e. audio and/or video files to the browser.

I have been able to successfully do this in Chrome using the below code snippet:

          DesiredCapabilities capabilities = DesiredCapabilities.chrome(); 
          ChromeOptions options = new ChromeOptions();
          options.addArguments("--allow-file-access-from-files",
                                                 "--use-fake-ui-for-media-stream",
                                                 "--allow-file-access",
                                                 "--use-file-for-fake-audio-capture=D:\\PATH\\TO\\WAV\\xxx.wav",
                                                 "--use-fake-device-for-media-stream");
           capabilities.setCapability(ChromeOptions.CAPABILITY, options);
           ChromeDriver driver = new ChromeDriver(capabilities);


Are there similar options available in Firefox to achieve the same capability? If not, how can this be done? Any help will be helpful.

Thanks, John

Hi, I am developing a java/selenium based application and need to fake a microphone/cam and pass media i.e. audio and/or video files to the browser. I have been able to successfully do this in Chrome using the below code snippet: DesiredCapabilities capabilities = DesiredCapabilities.chrome(); ChromeOptions options = new ChromeOptions(); options.addArguments("--allow-file-access-from-files", "--use-fake-ui-for-media-stream", "--allow-file-access", "--use-file-for-fake-audio-capture=D:\\PATH\\TO\\WAV\\xxx.wav", "--use-fake-device-for-media-stream"); capabilities.setCapability(ChromeOptions.CAPABILITY, options); ChromeDriver driver = new ChromeDriver(capabilities); Are there similar options available in Firefox to achieve the same capability? If not, how can this be done? Any help will be helpful. Thanks, John

由jonsylvester87于修改

所有回复 (1)

more options