alongubkin / alongubkin/phonertc

IceGatheringChange state COMPLETE before all candidates

Đang mở
#211 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Objective-C
Star
864
Fork
298
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.