Twilio screensharing on localhost in firefox?

谁说我不能喝 提交于 2019-12-10 23:40:17

问题


Currently screensharing on localhost in firefox throws the following error: The request is not allowed by the user agent or the platform in the current context..

Here's my code:

navigator.mediaDevices.getUserMedia({ video: { mediaSource: 'screen' } })
      .then((stream) => {
            console.log('stream', stream)
      })
      .catch((err) => {
            console.log('err', err)
      })

回答1:


If you are using it for testing, setting media.navigator.permission.disabled to true in about:config skips the dialog and the error.



来源:https://stackoverflow.com/questions/46497849/twilio-screensharing-on-localhost-in-firefox

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