Firefox 76.0.1 中未定义 RTCPeerConnection

May*_*mar 2 javascript firefox webrtc

我正在学习 WebRTC,并在 MDN 上发现了这个演示应用程序,它无法在我的 Firefox 76.0.1 上运行。控制台错误是:ReferenceError: RTCPeerConnection is not defined。我尝试通过在控制台中创建RTCPeerConnection:的新实例来验证这一点new RTCPeerConnection(),果然,它不存在。这似乎是 Firefox 独有的问题。我在其他浏览器上没有收到此错误。我是否需要在浏览器中启用某些功能才能使用此 API?我很难相信 Firefox 会不支持这个 API。

哦,这不仅仅是RTCPeerConnection。其他对等连接 API 也都不RTCIceCandidate可用。

Phi*_*cke 5

media.peerconnection.enabled检查in的值about:config。默认值是打开的,但它可能已被扩展修改。