AlexKMDev / WebRTC

Unofficial builds of Google WebRTC iOS Framework
https://webrtc.org/native-code/ios/
Other
292 stars 76 forks source link

Connect to apprtc.appspot.com #8

Closed multybuq closed 8 years ago

multybuq commented 8 years ago

Hello. Does this framework connects to apprtc.appspot.com? I got the error setting Remote description. The error returned is:

Error Domain=org.webrtc.RTCPeerConnection Code=-1 "SessionDescription is NULL." UserInfo={NSLocalizedDescription=SessionDescription is NULL.}

Session description for method looks fine, except first line of RTCSessionDescription:offer duplicate. That duplicate appeared after parsing server response via [[RTCSessionDescription alloc] initWithType:[RTCSessionDescription typeForString:type] sdp:sdp] method.

RTCSessionDescription: offer RTCSessionDescription: offer v=0 o=- 8915433080122444691 2 IN IP4 127.0.0.1 s=- t=0 0 a=group:BUNDLE audio video a=msid-semantic: WMS ARDAMS m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 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:9juo a=ice-pwd:OQyO7TEOWImVci96hLW7OqmT a=ice-options:renomination a=fingerprint:sha-256 4F:69:DE:1E:CA:5E:27:77:FD:D2:85:B5:B2:3E:01:0A:19:FD:F6:E8:39:CB:72:18:F6:90:A5:41:EC:B6:C4:10 a=setup:actpass a=mid:audio a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time a=sendrecv a=rtcp-mux a=rtpmap:111 opus/48000/2 a=rtcp-fb:111 transport-cc a=fmtp:111 minptime=10;useinbandfec=1 a=rtpmap:103 ISAC/16000 a=rtpmap:104 ISAC/32000 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 telephone-event/8000 a=ssrc:3114092449 cname:RzAEpzxs7apytadA a=ssrc:3114092449 msid:ARDAMS ARDAMSa0 a=ssrc:3114092449 mslabel:ARDAMS a=ssrc:3114092449 label:ARDAMSa0 m=video 9 UDP/TLS/RTP/SAVPF 100 107 116 117 96 99 98 c=IN IP4 0.0.0.0 a=rtcp:9 IN IP4 0.0.0.0 a=ice-ufrag:9juo a=ice-pwd:OQyO7TEOWImVci96hLW7OqmT a=ice-options:renomination a=fingerprint:sha-256 4F:69:DE:1E:CA:5E:27:77:FD:D2:85:B5:B2:3E:01:0A:19:FD:F6:E8:39:CB:72:18:F6:90:A5:41:EC:B6:C4:10 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=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01 a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay a=sendrecv a=rtcp-mux a=rtcp-rsize 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=rtcp-fb:100 transport-cc a=rtpmap:107 H264/90000 a=rtcp-fb:107 ccm fir a=rtcp-fb:107 nack a=rtcp-fb:107 nack pli a=rtcp-fb:107 goog-remb a=rtcp-fb:107 transport-cc a=fmtp:107 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f a=rtpmap:116 red/90000 a=rtpmap:117 ulpfec/90000 a=rtpmap:96 rtx/90000 a=fmtp:96 apt=100 a=rtpmap:99 rtx/90000 a=fmtp:99 apt=107 a=rtpmap:98 rtx/90000 a=fmtp:98 apt=116 a=ssrc-group:FID 2412545784 1462827299 a=ssrc:2412545784 cname:RzAEpzxs7apytadA a=ssrc:2412545784 msid:ARDAMS ARDAMSv0 a=ssrc:2412545784 mslabel:ARDAMS a=ssrc:2412545784 label:ARDAMSv0 a=ssrc:1462827299 cname:RzAEpzxs7apytadA a=ssrc:1462827299 msid:ARDAMS ARDAMSv0 a=ssrc:1462827299 mslabel:ARDAMS a=ssrc:1462827299 label:ARDAMSv0

or maybe you can advice what server works fine with latest release?

AlexKMDev commented 8 years ago

Hi.

Does this framework connects to apprtc.appspot.com?

I don't know, but it should, because as I remember Google uses that signaling server for their demo AppRTCMobile app. I only used our internally developed signaling server for rooms and SDP exchange.

Please check this comment in order to see how I set remote description in my app. And please ask for such help in discussion group, it is a community and there are more experienced people.

multybuq commented 8 years ago

thanks, figured out it myself, but you pointed to right direction.

mohangslab083 commented 7 years ago

@multybuq, I am facing the same issue. Could you please let me know how you resolved the issue.

multybuq commented 7 years ago

@mohangslab083 if you are using apprtc ios demo client with this webrtc framework, you have to modify RTCSessionDescription+JSON class, because problem is there. I just parsed webrtc source files for proper RTCSessionDescription generator/parser and connection methods

DSaurabh commented 7 years ago

@multybuq i am facing similar issue. i have checked out latest webrtc code and able to compile framework with webrtc script. Please share the source code for required changes.

multybuq commented 7 years ago

@DSaurabh I've already changed all my classes for custom signaling server, so i can not share what you need. I just can point you to reason of your issue. You should check all of your session description categories and offer/answer session generating and exchanging. BTW, ADRAppClient.m contains all you need. It may connect to appRTC.com properly. So please get webrtc source code and check sample code.

DSaurabh commented 7 years ago

@multybuq i was able to use some old library and old syntax which is working fine for me. In new set of API i am facing this issue. Since appRTC app is based on old api set it is not useful for new API set and latest binaries. Link : https://chromium.googlesource.com/external/webrtc/+/master/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCPeerConnection.h

Old API: [peerConnection setLocalDescriptionWithDelegate:(id) self sessionDescription : rtcDesc];

With new API: //To init SDP (instancetype)initWithType:(RTCSdpType)type sdp:(NSString *)sdp //To setLocalDescription