EricssonResearch / openwebrtc-android-sdk

SDK for adding OpenWebRTC to your Android app
BSD 2-Clause "Simplified" License
45 stars 29 forks source link

Android and web client #14

Open stankohorvat opened 8 years ago

stankohorvat commented 8 years ago

Having problems with connection between web client (custom implementation) and android web client sends offer in JSON sturucture, but android excepts it in string (like form demo.openwebrtc.org)

demo to android: {"sdp":{"type":"offer","sdp":"v=0\r\no=mozilla...THIS_IS_SDPARTA-43.0.4 4955272746125827467 0 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\na=sendrecv\r\na=fingerprint:sha-256 ***\r\na=ice-options:trickle\r\na=msid-semantic:WMS *\r\nm=video 9 UDP/TLS/RTP/SAVPF 120 126 97\r\nc=IN IP4 0.0.0.0\r\na=sendrecv\r\na=fmtp:126 profile-level-id=42e01f;level-asymmetry-allowed=1;packetization-mode=1\r\na=fmtp:97 profile-level-id=42e01f;level-asymmetry-allowed=1\r\na=fmtp:120 max-fs=12288;max-fr=60\r\na=ice-pwd:0ac1f4c52b62a24e1ee40300910002f3\r\na=ice-ufrag:9d5dc846\r\na=mid:sdparta_0\r\na=msid:{54668381-5e49-4d94-8d2d-8ca1faf2d0e4} {a0aa0b97-5660-41ed-8622-b2d191a19d5a}\r\na=rtcp-fb:120 nack\r\na=rtcp-fb:120 nack pli\r\na=rtcp-fb:120 ccm fir\r\na=rtcp-fb:126 nack\r\na=rtcp-fb:126 nack pli\r\na=rtcp-fb:126 ccm fir\r\na=rtcp-fb:97 nack\r\na=rtcp-fb:97 nack pli\r\na=rtcp-fb:97 ccm fir\r\na=rtcp-mux\r\na=rtpmap:120 VP8/90000\r\na=rtpmap:126 H264/90000\r\na=rtpmap:97 H264/90000\r\na=setup:actpass\r\na=ssrc:455963736 cname:{6f6fa442-6b2f-4374-9d1e-bcafd2d367a3}\r\n"}}

custom web client to android

{"sdp":"","sessionDescription":{"version":0,"originator":{"username":"mozilla...THIS_IS_SDPARTA-43.0.4","sessionId":"5713993235545166921","sessionVersion":0,"netType":"IN","addressType":"IP4","address":"0.0.0.0"},"sessionName":"-","startTime":0,"stopTime":0,"mediaDescriptions":[{"type":"video","port":9,"protocol":"UDP/TLS/RTP/SAVPF","netType":"IN","addressType":"IP4","address":"0.0.0.0","mode":"sendrecv","payloads":[{"type":120,"encodingName":"VP8","clockRate":90000,"nack":true,"nackpli":true,"ccmfir":true,"ericscream":false,"parameters":{"maxFs":12288,"maxFr":60}},{"type":126,"encodingName":"H264","clockRate":90000,"nack":true,"nackpli":true,"ccmfir":true,"ericscream":false,"parameters":{"profileLevelId":"42e01f","levelAsymmetryAllowed":1,"packetizationMode":1}},{"type":97,"encodingName":"H264","clockRate":90000,"nack":true,"nackpli":true,"ccmfir":true,"ericscream":false,"parameters":{"profileLevelId":"42e01f","levelAsymmetryAllowed":1}}],"rtcp":{"mux":true},"ssrcs":[27290248],"cname":"{de266733-cbd2-4da1-bdc1-f4e3ed67f636}","ice":{"ufrag":"fb0b9bc1","password":"323145de49af8a9cc359df1ed08fd13d","iceOptions":{"trickle":true}},"dtls":{"fingerprintHashFunction":"sha-256","fingerprint":"*****","setup":"actpass"}}]},"type":"offer"}

question

Is it in plans that android sdk also uses JSON structore not that string?

paullouisageneau commented 8 years ago

I had the same issue so I patched the code accordingly in paullouisageneau/openwebrtc-android-sdk (and paullouisageneau/openwebrtc-examples for the example web client). I also made modifications to candidate and candidateDescription messages so they follow the same principle.

stankohorvat commented 8 years ago

thanks, followed same fork