在Firefox中的localhost上进行Twilio屏幕共享? [英] Twilio screensharing on localhost in firefox?
本文介绍了在Firefox中的localhost上进行Twilio屏幕共享?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当前在firefox中的localhost上进行屏幕共享会引发以下错误:
The request is not allowed by the user agent or the platform in the current context.
.
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.
.
这是我的代码:
navigator.mediaDevices.getUserMedia({ video: { mediaSource: 'screen' } })
.then((stream) => {
console.log('stream', stream)
})
.catch((err) => {
console.log('err', err)
})
推荐答案
如果将其用于测试,则在about:config中将media.navigator.permission.disabled
设置为true会跳过对话框和错误.
If you are using it for testing, setting media.navigator.permission.disabled
to true in about:config skips the dialog and the error.
这篇关于在Firefox中的localhost上进行Twilio屏幕共享?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文