简体   繁体   English

我应该等待 RTCPeerConnection.setRemoteDescription() 和 RTCPeerConnection.addIceCandidate() Promises 解决吗?

[英]Should I wait for RTCPeerConnection.setRemoteDescription() & RTCPeerConnection.addIceCandidate() Promises to settle?

  1. RTCPeerConnection.setRemoteDescription() returns a Promise that resolves once the value of the connection's remoteDescription is successfully changed. RTCPeerConnection.setRemoteDescription()返回一个 Promise,一旦连接的 remoteDescription 的值成功更改,它就会解析。 Do I need to wait for this Promise to resolve successfully before calling RTCPeerConnection.addIceCandidate() ?在调用RTCPeerConnection.addIceCandidate()之前,我是否需要等待此 Promise 成功解析?

  2. Furthermore RTCPeerConnection.addIceCandidate() returns a Promise which is fulfilled when the candidate has been successfully added to the remote peer's description by the ICE agent.此外, RTCPeerConnection.addIceCandidate()返回一个 Promise,当 ICE 代理成功地将候选者添加到远程对等方的描述时,该承诺就会被实现。 Should I wait for this Promise to resolve successfully before adding the next available candidate via RTCPeerConnection.addIceCandidate() or can IceCandidates be added in parallel?在通过RTCPeerConnection.addIceCandidate()添加下一个可用的候选之前,我应该等待这个 Promise 成功解析还是可以并行添加 IceCandidates?

这是没有必要的,见的操作链的描述在本说明书中这保证了在顺序执行。

暂无
暂无

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

相关问题 无法在“RTCPeerConnection”上执行“setRemoteDescription”:无法转换为字典 - Failed to execute 'setRemoteDescription' on 'RTCPeerConnection': cannot convert to dictionary DOMException:无法在“RTCPeerConnection”上执行“setRemoteDescription”:无法设置远程应答 sdp - DOMException: Failed to execute 'setRemoteDescription' on 'RTCPeerConnection': Failed to set remote answer sdp 无法在“RTCPeerConnection”上执行“setRemoteDescription”:无法设置远程应答 sdp - Failed to execute 'setRemoteDescription' on 'RTCPeerConnection': Failed to set remote answer sdp 我应该如何将 localStream 对象作为参数传递给 rtcpeerconnection addtrack 方法 - How should i pass a localStream object as an argument to an rtcpeerconnection addtrack method 如何禁用RTCPeerConnection? - How do I disable RTCPeerConnection? WebRTC 在控制台上的 RTCPeerConnection 错误上执行 'addIceCandidate' 失败,但仍然可以显示远程和本地视频 - WebRTC getting Failed to execute 'addIceCandidate' on RTCPeerConnection error on console but can still display remote and local videos 离子2上的RtcPeerConnection - RtcPeerConnection on Ionic 2 无法使用RTCPeerConnection :: setRemoteDescription:无法设置远程商品sdp:无法设置远程视频描述发送参数 - Unable to RTCPeerConnection::setRemoteDescription: Failed to set remote offer sdp: Failed to set remote video description send parameters RTCPeerconnection上的信令 - Signaling on RTCPeerconnection “无法 RTCPeerConnection::setRemoteDescription: 无法设置远程应答 sdp: 调用错误 state: kStable” - “Unable to RTCPeerConnection::setRemoteDescription: Failed to set remote answer sdp: Called in wrong state: kStable”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM