Twilio screensharing on localhost in firefox?

2019-07-14 08: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条回答
该账号已被封号
2楼-- · 2019-07-14 08:43

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

查看更多
登录 后发表回答