NS_ERROR_UNEXPECTED in FireFox on mozRTCPeerConnection()

前端 未结 3 1703
一整个雨季
一整个雨季 2021-01-20 03:32

I am using adapter.js in my webrtc 1-1 video call application. It works fine on Google Chrome and both peers see each other\'s video and can hear audio. However, when I run

相关标签:
3条回答
  • 2021-01-20 04:13

    I found the mistake, it was in how we specify the iceServers.

    Correction is :

    {'iceServers': [
      createIceServer(isChrome
        ? 'stun:stun.l.google.com:19302'
        : 'stun:23.21.150.121', null, null)
    ]}
    
    0 讨论(0)
  • 2021-01-20 04:16

    Update your browser. Fully qualified domain names in iceServer URLs have been supported since Firefox 22 (circa March 2013), and adapter.js does not generally cover browsers that old.

    Also, note that createIceServer is no longer needed - and unavailable - in the latest version of adapter.js. There's still a polyfill in there for some changes in syntax, but it is handled transparently now, without needing to use this special function.

    0 讨论(0)
  • 2021-01-20 04:39

    This may be outdated but it may be of some help. I had the same NS_ERROR_UNEXPECTED when creating the new RTCPeerConnection(config).

    My problem was that my iceServers array had an invalid urls part that was giving problems to Firefox, specifically i had urls: 'turn:someUsername@ipAddress:port'

    I found out after some time that someUsername@ was not acceptable to FF although it works on Chrome.

    Removing the username@ part of the string fixed the issue for me, hope it helps.

    0 讨论(0)
提交回复
热议问题