alongubkin / alongubkin/phonertc
IceGatheringChange state COMPLETE before all candidates
- 主要语言
- Objective-C
- 星标
- 864
- 派生
- 298
- PR 合并指标
- 30 天内没有已合并 PR
描述
Looks like COMPLETE event is fired before all candidates are gathered and we receive the candidates event after this events in JS.
public void onIceGatheringChange(final IceGatheringState arg0) {
try {
JSONObject json = new JSONObject();
json.put("type", "IceGatheringChange");
json.put("state", arg0.name());
sendMessage(json);
} catch (JSONException e) {
e.printStackTrace();
}
}
I think this should run on UI thread as below.
public void onIceGatheringChange(final IceGatheringState arg0) {
_plugin.getActivity().runOnUiThread(new Runnable() {
public void run() {
try {
JSONObject json = new JSONObject();
json.put("type", "IceGatheringChange");
json.put("state", arg0.name());
sendMessage(json);
} catch (JSONException e) {
e.printStackTrace();
}
}
});
}
HOW TO TEST:
In scenario when both parties are behind symmetric NAT, sometimes video does not come because relay candidates are not shared. As they are the last ones to appear i could also see the firing of COMPLETE event before these candidates.
I am not 100% sure if this would solve the problem but there should be a way to order these events.
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。