Failed to make webrtc call with DataChannel from Chrome web app to Android app

假装没事ソ 提交于 2019-12-11 20:35:20

问题


I wrote a webrtc webapp (with video + audio + dataChannel) on:
https://github.com/wennycooper/wsProject

I wrote an Android webrtc app too on:
https://github.com/wennycooper/webrtcClient

The webapp-to-webapp call works fine. The androidapp-to-androidapp without data channel also works fine.

I tried to add data channel code into androidapp and make call from webapp to androidapp. When the callee received the Offer, it shown following error:

04-10 15:48:32.410: W/libjingle(10639): Warning(rtpdataengine.cc:149): Failed to SetSendCodecs because there is no known codec.
04-10 15:48:32.410: W/libjingle(10639): Warning(channel.cc:2375): Failed to set remote data description
04-10 15:48:32.420: E/libjingle(10639): Error(channel.cc:730): Failure in SetRemoteContent with action 0
04-10 15:48:32.420: E/libjingle(10639): Error(webrtcsession.cc:272): Failed to set remote offer sdp: Session error code: ERROR_CONTENT. Session error description: Failed to set data send codecs..
04-10 15:48:32.420: D/MainActivity(10639): Creating ANSWER...
04-10 15:48:32.420: E/libjingle(10639): Error(webrtcsessiondescriptionfactory.cc:245): CreateAnswer can't be called before SetRemoteDescription.
04-10 15:48:32.420: E/libjingle(10639): Error(webrtcsessiondescriptionfactory.cc:408): Create SDP failed: CreateAnswer can't be called before SetRemoteDescription.

The full adb log is over here:
https://s3-us-west-2.amazonaws.com/kkwebrtc/webrtcAndroid_callee.txt

I have no idea what's going on??
Anyone can provide a working example with data channel will be very appreciated.


回答1:


Finally, I got a working example.

What I did is comment out following line and use SCTPDataChannel.

//pcConstraints.optional.add(new KeyValuePair("RtpDataChannels", "false")); 

The working example is here:
https://github.com/wennycooper/webrtcClient



来源:https://stackoverflow.com/questions/29556425/failed-to-make-webrtc-call-with-datachannel-from-chrome-web-app-to-android-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!