NW.js:无法解析SessionDescription.无法正确解析音频编解码器

Sas*_*aal 2 javascript google-chrome webrtc node-webkit peerjs

我们正在与peerjs(Webrtc)建立视频聊天.我们有一个nodewebkit版本和一个chrome版本.但由于某种原因,如果chrome启动了一个mediawebkit的媒体流,我们在nw中得到了跟随错误.

PeerJS:  Creating RTCPeerConnection.
peer.min.js:1 PeerJS:  Listening for ICE candidates.
peer.min.js:1 PeerJS:  Listening for `negotiationneeded`
peer.min.js:1 PeerJS:  Listening for data channel
peer.min.js:1 PeerJS:  Listening for remote stream
peerJS:  Setting remote description RTCSessionDescription {sdp: "v=0?o=- 2956768960815374026 2 IN IP4 127.0.0.1?s…5525 label:87a9904d-945d-4393-ad98-68be98482104?", type: "offer"}
peer.min.js:1 PeerJS:  ERROR Error: Failed to parse SessionDescription.  Failed to parse audio codecs correctly.
callingManager.js:293 webrtc:Failed to parse SessionDescription.  Failed to parse audio codecs correctly.
peer.min.js:1 PeerJS:  Failed to setRemoteDescription,  Failed to parse SessionDescription.  Failed to parse audio codecs correctly.
8peer.min.js:1 Uncaught SyntaxError: Failed to execute 'addIceCandidate' on 'RTCPeerConnection': The ICE candidate could not be added.
Run Code Online (Sandbox Code Playgroud)

所以错误是:

Error: Failed to parse SessionDescription.  Failed to parse audio codecs correctly.
Run Code Online (Sandbox Code Playgroud)

nodewebkit到Chrome运行良好.

新版本:v0.12.3 Chrome版本:46

这是媒体保险问题吗?有人可以帮忙吗?谢谢!

Phi*_*cke 8

Chrome 46将SDP m-line中的协议从"RTP/SAVPF"更改为"UDP/TLS/RTP/SAVPF".似乎node-webkit是一个非常古老的webrtc版本(> 1年),无法解决这个问题.

这已经宣布了很长一段时间.请参阅https://twitter.com/juberti/status/656535175635963904等.

Munge你的SDP并用"RTP/SAVPF"替换"UDP/TLS/RTP/SAVPF".