ISBX / apprtc-node-server

The web based video chat app based on WebRTC written in NodeJS
70 stars 55 forks source link

Improper JSON Response #5

Open musmanh opened 8 years ago

musmanh commented 8 years ago

I am using the native project at https://github.com/ISBX/apprtc-ios. It works perfect for video call from device to device (iPad to iPhone).

However if I deploy the apprtc-node-server on my local computer & point to this server (http://192.168.11.8:3000) instead of https://apprtc.appspot.com & then If I go through following steps:

  1. Joining a room (giving a new random name) from iPhone
  2. Joining the same room from iPad generates an improper JSON from server.

It crashes at the following point:

Class Name: NSDictionary+ARDUtilites Method Name: dictionaryWithJSONString Line : NSParameterAssert(jsonString.length > 0);

It fails to parse the JSON returned from server, following is a sample JSON retuned:

"{\"type\":\"offer\",\"sdp\":\"v" = "0\r\no=- 5507084124527093233 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE audio video\r\na=msid-semantic: WMS ARDAMS\r\nm=audio 9 UDP\/TLS\/RTP\/SAVPF 111 103 104 9 102 0 8 106 105 13 127 126\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:DZr4ZWhecIaugVsS\r\na=ice-pwd: CvefDFj\/aFcKkqvnBc6JwWS\r\na=fingerprint:sha-256 64:6A:92:78:54:30:32:7F:A8:A8:53:0B:D8:34:B8:0B:89:84:F8:75:21:51:01:AE:A1:B0:5A:49:21:D7:4D:15\r\na=setup:actpass\r\na=mid:audio\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:3 http:\/\/www.webrtc.org\/experiments\/rtp-hdrext\/abs-send-time\r\na=sendrecv\r\na=rtcp-mux\r\na=rtpmap:111 opus\/48000\/2\r\na=fmtp:111 minptime=10; useinbandfec=1\r\na=rtpmap:103 ISAC\/16000\r\na=rtpmap:104 ISAC\/32000\r\na=rtpmap:9 G722\/8000\r\na=rtpmap:102 ILBC\/8000\r\na=rtpmap:0 PCMU\/8000\r\na=rtpmap:8 PCMA\/8000\r\na=rtpmap:106 CN\/32000\r\na=rtpmap:105 CN\/16000\r\na=rtpmap:13 CN\/8000\r\na=rtpmap:127 red\/8000\r\na=rtpmap:126 telephone-event\/8000\r\na=maxptime:60\r\na=ssrc:2079863351 cname:oO76JWYDlPZLliIf\r\na=ssrc:2079863351 msid:ARDAMS ARDAMSa0\r\na=ssrc:2079863351 mslabel:ARDAMS\r\na=ssrc:2079863351 label:ARDAMSa0\r\nm=video 9 UDP\/TLS\/RTP\/SAVPF 100 101 116 117 96\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:DZr4ZWhecIaugVsS\r\na=ice-pwd: CvefDFj\/aFcKkqvnBc6JwWS\r\na=fingerprint:sha-256 64:6A:92:78:54:30:32:7F:A8:A8:53:0B:D8:34:B8:0B:89:84:F8:75:21:51:01:AE:A1:B0:5A:49:21:D7:4D:15\r\na=setup:actpass\r\na=mid:video\r\na=extmap:2 urn:ietf:params:rtp-hdrext:toffset\r\na=extmap:3 http:\/\/www.webrtc.org\/experiments\/rtp-hdrext\/abs-send-time\r\na=extmap:4 urn:3gpp:video-orientation\r\na=sendrecv\r\na=rtcp-mux\r\na=rtpmap:100 VP8\/90000\r\na=rtcp-fb:100 ccm fir\r\na=rtcp-fb:100 nack\r\na=rtcp-fb:100 nack pli\r\na=rtcp-fb:100 goog-remb\r\na=rtpmap:101 VP9\/90000\r\na=rtcp-fb:101 ccm fir\r\na=rtcp-fb:101 nack\r\na=rtcp-fb:101 nack pli\r\na=rtcp-fb:101 goog-remb\r\na=rtpmap:116 red\/90000\r\na=rtpmap:117 ulpfec\/90000\r\na=rtpmap:96 rtx\/90000\r\na=fmtp:96 apt=100\r\na=ssrc-group:FID 2961773505 3335171879\r\na=ssrc:2961773505 cname:oO76JWYDlPZLliIf\r\na=ssrc:2961773505 msid:ARDAMS ARDAMSv0\r\na=ssrc:2961773505 mslabel:ARDAMS\r\na=ssrc:2961773505 label:ARDAMSv0\r\na=ssrc:3335171879 cname:oO76JWYDlPZLliIf\r\na=ssrc:3335171879 msid:ARDAMS ARDAMSv0\r\na=ssrc:3335171879 mslabel:ARDAMS\r\na=ssrc:3335171879 label:ARDAMSv0\r\n\"}";