0

我在: https ://github.com/wennycooper/wsProject上写了一个 webrtc webapp(带有视频 + 音频 + 数据通道)

我也在上面写了一个 Android webrtc 应用程序:
https ://github.com/wennycooper/webrtcClient

webapp-to-webapp 调用工作正常。没有数据通道的 androidapp-to-androidapp 也可以正常工作。

我试图将数据通道代码添加到 androidapp 并从 webapp 调用 androidapp。当被调用者收到Offer时,它显示以下错误:

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.

完整的 adb 日志在这里:
https ://s3-us-west-2.amazonaws.com/kkwebrtc/webrtcAndroid_callee.txt

我不知道是怎么回事??
任何人都可以提供带有数据通道的工作示例,将不胜感激。

4

1 回答 1

3

最后,我得到了一个工作示例。

我所做的是注释掉下一行并使用 SCTPDataChannel。

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

工作示例在这里:
https ://github.com/wennycooper/webrtcClient

于 2015-04-10T10:46:18.090 回答