我尝试在Android手机和iPhone之间基于webrtc框架创建视频通话。我的Android应用具有较旧的原始libjingle版本的webrtc。 android手机之间的通话正常。现在,我需要为IOS创建相同的内容。 IOS应用程序版本具有最新的GoogleWebRTC窗格。 我有以下通话顺序-我的iPhone正在将报价sdp发送到android手机。然后,我的android手机为此sdp设置了remotedescription,并将答案sdp发送到iPhone。奇怪的是,在createanswer之后,Android手机中没有生成任何候选冰块。也许是因为这里描述的问题?问题是在iPhone上由Android生成的sdp上的setRemotedescription。
无法设置远程应答sdp:无法设置远程视频说明发送参数
这是Android手机生成的答案sdp
v = 0
o =-762106171166748079 2 IN IP4 127.0.0.1
s =-
t = 0 0
a = group:捆绑音频视频
a = msid语义:WMS localStreamPN
m =音频9 UDP / TLS / RTP / SAVPF 111 103 9 102 0 8 106 105 13 126
c = IN IP4 0.0.0.0
a = rtcp:9 IN IP4 0.0.0.0
a = ice-ufrag:STWZvyDrg2jrCWD3
a = ice-pwd:h7YcLnaIpyub0Us3pz3WmKTk
a =指纹:sha-256 5C:EB:AE:D3:D0:61:7E:49:66:41:27:75:32:2E:7B:D4:63:A3:DE:24: FE:0E:6C:CD:E7:E5:4E:CB:62:DF:1E:62
a = setup:active
a = mid:audio
a = extmap:1 urn:ietf:params:rtp-hdrext:ssrc音频级别
a = sendrecv
a = rtcp-mux
a = rtpmap:111 opus / 48000/2
a = fmtp:111 minptime = 10; useinbandfec = 1
a = rtpmap:103 ISAC / 16000
a = rtpmap:9 G722 / 8000
a = rtpmap:102 ILBC / 8000
a = rtpmap:0 PCMU / 8000
a = rtpmap:8 PCMA / 8000
a = rtpmap:106 CN / 32000
a = rtpmap:105 CN / 16000
a = rtpmap:13 CN / 8000
a = rtpmap:126电话事件/ 8000
a = maxptime:60
a = ssrc:389359775 cname:RePIAAwg99g1GmQH
a = ssrc:389359775 msid:localStreamPN audioPN
a = ssrc:389359775 mslabel:localStreamPN
a = ssrc:389359775标签:audioPN
m =视频9 UDP / TLS / RTP / SAVPF 100127
c = IN IP4 0.0.0.0
a = rtcp:9 IN IP4 0.0.0.0
a = ice-ufrag:STWZvyDrg2jrCWD3
a = ice-pwd:h7YcLnaIpyub0Us3pz3WmKTk
a =指纹:sha-256 5C:EB:AE:D3:D0:61:7E:49:66:41:27:75:32:2E:7B:D4:63:A3:DE:24: FE:0E:6C:CD:E7:E5:4E:CB:62:DF:1E:62
a = setup:active
a = mid:视频
a = extmap:2缸:ietf:params:rtp-hdrext:toffset
a = extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a = extmap:4缸:3gpp:视频方向
a = sendrecv
a = rtcp-mux
a = rtpmap:100红色/ 90000
a = rtpmap:127 ulpfec / 90000
a = ssrc:1543220935 cname:RePIAAwg99g1GmQH
a = ssrc:1543220935 msid:localStreamPN videoPN
a = ssrc:1543220935 mslabel:localStreamPN
a = ssrc:1543220935标签:videoPN
当我为android到android调用打印相同的sdp时,它看起来有所不同。我通过PubNub使用信令服务。我看到很多人都在面对这个问题,但是我不知道如何在这里解决它
更新2018-08-28:
我按照您的建议并按照以下方式初始化了PeerconnectionFactory。但出现相同的错误-无法设置远程应答sdp:无法设置远程视频描述发送参数(iPhone无法为Android应答设置remotedescription)。
let decoderFactory = RTCDefaultVideoDecoderFactory.init()
let encoderFactory = RTCDefaultVideoEncoderFactory.init()
let videoCodedInfo = RTCVideoCodecInfo.init(name: "VP8")
encoderFactory.preferredCodec = videoCodedInfo
let connectionFactory = RTCPeerConnectionFactory.init(encoderFactory: encoderFactory, decoderFactory: decoderFactory)