【问题标题】:NW.js: Failed to parse SessionDescription. Failed to parse audio codecs correctlyNW.js:无法解析 SessionDescription。无法正确解析音频编解码器
【发布时间】:2016-01-21 22:33:28
【问题描述】:

我们正在与 peerjs (Webrtc) 建立视频聊天。我们有一个 nodewebkit 版本和一个 chrome 版本。 但是由于某种原因,如果 chrome 启动一个媒体流到 nodewebkit,我们会在 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.

所以错误是:

Error: Failed to parse SessionDescription.  Failed to parse audio codecs correctly.

nodewebkit 到 Chrome 运行良好。

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

这是媒体 condec 问题吗?任何人都可以帮忙吗? 谢谢!

【问题讨论】:

    标签: javascript google-chrome webrtc node-webkit peerjs


    【解决方案1】:

    Chrome 46 将 SDP m 行中的协议从“RTP/SAVPF”更改为“UDP/TLS/RTP/SAVPF”。似乎 node-webkit 是一个非常旧的 webrtc 版本(> 1 年),无法处理这个问题。

    这已经公布了很长时间了。请参阅https://twitter.com/juberti/status/656535175635963904 等人。

    Munge 您的 SDP 并将“UDP/TLS/RTP/SAVPF”替换为“RTP/SAVPF”。

    【讨论】:

    • 对不起,我不是很熟练。我怎样才能做到这一点?我在谷歌上找不到那个。谢谢!
    • 玩过peerjs后,我明白你的意思了。现在它正在工作。非常感谢!你认为我需要解释一下我在 peerjs 中所做的更改吗?
    • @Beatnory,你能说说你做了什么改变吗?
    • 在 peer.js 中我添加了 "offer.sdp = offer.sdp.replace("UDP/TLS/RTP/SAVPF", "RTP/SAVPF");"在第 610 行和第 617 行
    猜你喜欢
    • 2017-03-25
    • 2014-10-10
    • 2013-04-11
    • 1970-01-01
    • 2019-03-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多