最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - RTCPeerConnection is not defined in Firefox 76.0.1 - Stack Overflow

programmeradmin3浏览0评论

I was learning about WebRTC and came across this demo app on MDN which does not work on my Firefox 76.0.1. The console error is : ReferenceError: RTCPeerConnection is not defined. I tried to verify this by creating a new instance of RTCPeerConnection : new RTCPeerConnection() in the console and sure enough, it does not exist. It seems to be a firefox only issue. I did not get this error on other browsers. Do I need to enable something in my browser in order to use this API? I find it hard to believe that this API would not be suported by Firefox.

Oh, and it's not just RTCPeerConnection. None of the other peer connection APIs such as RTCIceCandidate are available either.

I was learning about WebRTC and came across this demo app on MDN which does not work on my Firefox 76.0.1. The console error is : ReferenceError: RTCPeerConnection is not defined. I tried to verify this by creating a new instance of RTCPeerConnection : new RTCPeerConnection() in the console and sure enough, it does not exist. It seems to be a firefox only issue. I did not get this error on other browsers. Do I need to enable something in my browser in order to use this API? I find it hard to believe that this API would not be suported by Firefox.

Oh, and it's not just RTCPeerConnection. None of the other peer connection APIs such as RTCIceCandidate are available either.

Share Improve this question edited May 11, 2020 at 9:38 Mayank Kumar asked May 11, 2020 at 9:05 Mayank KumarMayank Kumar 1,2233 gold badges14 silver badges20 bronze badges 1
  • It's ll broken since about a year, it's about mDns and dot local adresses, see bloggeek.me/psa-mdns-and-local-ice-candidates-are-ing Fixes are possible, but all libraries get broken without TURN servers – NVRM Commented May 17, 2021 at 19:52
Add a ment  | 

1 Answer 1

Reset to default 8

Check the value of media.peerconnection.enabled in about:config. The default value is on but it might have been modified by an extension.

发布评论

评论列表(0)

  1. 暂无评论