gpt4 book ai didi

swift - iOS Swift WebRTC - 无法设置远程优惠 sdp : Failed to set remote video description send parameters

转载 作者:行者123 更新时间:2023-11-30 10:26:15 26 4
gpt4 key购买 nike

我正在尝试在 iPhone 设备之间进行 webRTC 视频通话。一个应用程序正在创建报价 SDP,如下所示。当我尝试设置此 SDP 时,在另一个应用程序中收到错误,如下所示

Error Domain=org.webrtc.RTCPeerConnection Code=-1 "Failed to set remote offer sdp: Failed to set remote video description send parameters." UserInfo={NSLocalizedDescription=Failed to set remote offer sdp: Failed to set remote video description send parameters.}

以下是用于设置报价和创建答案的代码。第二行 self.peerConnection?.setRemoteDescription 抛出错误。

 let sessionDescription = RTCSessionDescription(type: .offer, sdp: remoteSdp)
self.peerConnection?.setRemoteDescription(sessionDescription, completionHandler: { [weak self] (error) in
guard let this = self else { return }
if let error = error {
this.delegate?.webrtcClient(client: this, didReceiveError: error)
} else {
this.handleRemoteDescriptionSet()
// create answer
peerConnection.answer(for: this.callConstraint, completionHandler:
{ (sdp, error) in
if let error = error {
this.delegate?.webrtcClient(client: this, didReceiveError: error)
} else {
this.handleSdpGenerated(sdpDescription: sdp)
}
})
}
})

以下是Offer SDP格式

v=0

o=- 271054486825926104 2 IN IP4 127.0.0.1

s=-

t=0 0

a=group:BUNDLE video

a=msid-semantic: WMS ARDAMS

m=video 9 UDP/TLS/RTP/SAVPF 100 101 116 117 96

c=IN IP4 0.0.0.0

a=rtcp:9 IN IP4 0.0.0.0

a=ice-ufrag:mwCLNm7ZLzmDrtCu

a=ice-pwd:+alfGXoarzyKjISWRYAGyIH4

a=fingerprint:sha-256 44:0D:11:54:EC:62:CD:51:D0:E3:BB:A5:47:35:D1:27:48:4E:08:3B:AD:98:72:98:02:BA:06:C8:CC:12:0E:C0

a=setup:actpass

a=mid:video

a=extmap:2 urn:ietf:params:rtp-hdrext:toffset

a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time

a=extmap:4 urn:3gpp:video-orientation

a=sendrecv

a=rtcp-mux

a=rtpmap:100 VP8/90000

a=rtcp-fb:100 ccm fir

a=rtcp-fb:100 nack

a=rtcp-fb:100 nack pli

a=rtcp-fb:100 goog-remb

a=rtpmap:101 VP9/90000

a=rtcp-fb:101 ccm fir

a=rtcp-fb:101 nack

a=rtcp-fb:101 nack pli

a=rtcp-fb:101 goog-remb

a=rtpmap:116 red/90000

a=rtpmap:117 ulpfec/90000

a=rtpmap:96 rtx/90000

a=fmtp:96 apt=100

a=ssrc-group:FID 1767367305 3714792746

a=ssrc:1767367305 cname:9wPGj45IHVxtvO6N

a=ssrc:1767367305 msid:ARDAMS ARDAMSv0

a=ssrc:1767367305 mslabel:ARDAMS

a=ssrc:1767367305 label:ARDAMSv0

a=ssrc:3714792746 cname:9wPGj45IHVxtvO6N

a=ssrc:3714792746 msid:ARDAMS ARDAMSv0

a=ssrc:3714792746 mslabel:ARDAMS

a=ssrc:3714792746 label:ARDAMSv0

最佳答案

没有candidate在您的报价 sdp 中。在你的 sdp 一代中,你必须等待生成候选者。您可以一次生成所有候选者,或 gather it incrementally 。无论如何,我没有看到任何冰候选人交换。也许检查一些开源项目。

关于swift - iOS Swift WebRTC - 无法设置远程优惠 sdp : Failed to set remote video description send parameters,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60038089/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com