如何通过browserStack功能将伪造的媒体流传递给Safari IOS? [英] How can I pass a fake media stream to safari IOS in browserStack capability?

查看:80
本文介绍了如何通过browserStack功能将伪造的媒体流传递给Safari IOS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用量角器浏览器堆栈,并试图使webrtc Web应用程序自动化,我需要摆脱浏览器询问以获得许可并使用伪造的视频流,而不是Chrome中可用的真实摄像头和麦克风.

I am using protractor and selenium with browser stack and trying to automate a webrtc web application, I need to get rid of browser asking for permission and using a fake stream instead of real camera and mic as available in chrome.

我尝试使用这些选项都无法使用.

选项1:

    var capabilities = {
    'browserName': 'iPhone',
    'device': 'iPhone 6S',
    'realMobile': 'true',
    'os_version': '11.4',
    "media.navigator.permission.disabled": true,
    "media.navigator.streams.fake": true
  };

选项2

    var capabilities = {
    'browserName': 'iPhone',
    'device': 'iPhone 6S',
    'realMobile': 'true',
    'os_version': '11.4',
    'safariOptions': {
      'args': ["--use-fake-ui-for-media-stream", '--use-fake-device-for-media-stream']
    }
  };

对于构建选项,我使用:

var driver = new webdriver.Builder()
usingServer('http://hub-cloud.browserstack.com/wd/hub').
withCapabilities(capabilities).
build();

推荐答案

当前,没有此类特定于BrowserStack的自定义功能来在Safari上传递伪造的媒体流.此外,Safari浏览器尚不支持传递假流.您可以阅读以下问题:

Currently, there is no such BrowserStack specific custom capability to pass fake media stream on Safari. Also, passing fake stream is not yet supported on Safari browsers. You can read about the issues below:

https://github.com/web-platform-tests/results-collection/issues/125

https://github.com/web-platform-tests/wpt/issues/7424

此外,Safari浏览器似乎不支持此类参数.我在示例SafariOptions示例

Also, there seem to be no such arguments supported for Safari browser. I reviewed the same in the sample SafariOptions examples here

这篇关于如何通过browserStack功能将伪造的媒体流传递给Safari IOS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆