Mitigate WebRTC Issue

The previous commit updates the Companion to better handle the case
where the Rendezvous server is far away from the user (long round trip
time).

This commit does a mitigation, at the cost of 5 seconds, in replmgr.js
that results in older Companions being more likely to connect with a
long round trip time.

Change-Id: Ice6b86b11a3c21beedf2c066ac46593659651713
parent 42112f1e
......@@ -1471,6 +1471,7 @@ Blockly.Msg.en.switch_language_to_english = {
Blockly.Msg.TIME_DURATION = "Duration";
// Connection Dialog Messages
Blockly.Msg.DIALOG_RENDEZVOUS_NEGOTIATING = "15 Rendezvous (please wait)";
Blockly.Msg.DIALOG_SECURE_ESTABLISHING = "20 Establishing Secure Connection";
Blockly.Msg.DIALOG_SECURE_ESTABLISHED = "30 Secure Connection Established";
Blockly.Msg.DIALOG_FOUND_COMPANION = "10 Found the Companion";
......
......@@ -464,8 +464,11 @@ Blockly.ReplMgr.putYail = (function() {
'offer' : desc}));
webrtcpeer.setLocalDescription(desc);
});
poll();
top.ConnectProgressBar_setProgress(15, Blockly.Msg.DIALOG_RENDEZVOUS_NEGOTIATING);
setTimeout(function() {
top.ConnectProgressBar_setProgress(20, Blockly.Msg.DIALOG_SECURE_ESTABLISHING);
poll();
}, 5000); // Wait 5 seconds for Rendezvous server to gather all ice candidates
},
'chunker' : (function() {
var seq = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment