How can I pass a fake media stream to safari IOS in browserStack capability?

£可爱£侵袭症+ 提交于 2021-01-29 02:58:14

问题


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.

I have tried using these options they both do not work.

Option 1:

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

Option 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']
    }
  };

For building options I use:

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

回答1:


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

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



来源:https://stackoverflow.com/questions/52857446/how-can-i-pass-a-fake-media-stream-to-safari-ios-in-browserstack-capability

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!