简体   繁体   English

何时编辑 WebRTC 连接的 SDP 消息

[英]When to Edit SDP Messages for WebRTC Connections

I'm following a Stack Overflow post on improving audio quality in WebRTC:我正在关注 WebRTC 中关于提高音频质量的 Stack Overflow 帖子:

Is it really possible for webRTC to stream high quality audio without noise? webRTC 到 stream 真的有可能没有噪音的高质量音频吗?

In the one answer, they edit the message between createAnswer() and setLocalDescription()在一个答案中,他们编辑了 createAnswer() 和 setLocalDescription() 之间的消息

However this article on limiting bandwidth of WebRTC connections says "we are not allowed to modify the offer between createOffer (or createAnswer) and setLocalDescription"然而,这篇关于限制 WebRTC 连接带宽的文章说“我们不允许修改 createOffer(或 createAnswer)和 setLocalDescription 之间的报价”

https://webrtchacks.com/limit-webrtc-bandwidth-sdp/ https://webrtchacks.com/limit-webrtc-bandwidth-sdp/

So my question is: which is correct?所以我的问题是:哪个是正确的?

The specification says you are not allowed to do modify the description between createOffer/createAnswer.规范说你不能修改 createOffer/createAnswer 之间的描述。 For a number of historical reasons browsers do allow "SDP munging" however.但是,由于许多历史原因,浏览器确实允许“SDP munging”。

What is allowed (and impossible to forbid by the specification) is modification of the SDP before setRemoteDescription as described in the webrtchacks article.允许的(规范不可能禁止的)是在 setRemoteDescription 之前修改 SDP,如 webrtchacks 文章中所述。 Please note that these days the setParameters API as demonstrated by this sample请注意,这些天 setParameters API 如本示例所示

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM