AppRTC: Alert the user to failure to acquire TURN server.
Hopefully will result in quicker turnaround time for CEOD/turnserver fixes. Might trigger undesirable levels of bogus/spammy/unhelpful/PEBCAK reports to discuss-webrtc, in which case I'll remove the second part of the message. R=juberti@google.com, juberti@webrtc.org Review URL: https://webrtc-codereview.appspot.com/4779005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5343 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -20,6 +20,7 @@ var isVideoMuted = false;
|
|||||||
var isAudioMuted = false;
|
var isAudioMuted = false;
|
||||||
// Types of gathered ICE Candidates.
|
// Types of gathered ICE Candidates.
|
||||||
var gatheredIceCandidateTypes = { Local: {}, Remote: {} };
|
var gatheredIceCandidateTypes = { Local: {}, Remote: {} };
|
||||||
|
var infoDivErrors = [];
|
||||||
|
|
||||||
function initialize() {
|
function initialize() {
|
||||||
if (errorMessages.length > 0) {
|
if (errorMessages.length > 0) {
|
||||||
@ -105,7 +106,12 @@ function onTurnResult() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log('Request for TURN server failed.');
|
var msg =
|
||||||
|
'No TURN server; unlikely that media will traverse networks. ' +
|
||||||
|
'If this persists please report it to discuss-webrtc@googlegroups.com.';
|
||||||
|
console.log(msg);
|
||||||
|
infoDivErrors.push(msg);
|
||||||
|
updateInfoDiv();
|
||||||
}
|
}
|
||||||
// If TURN request failed, continue the call with default STUN.
|
// If TURN request failed, continue the call with default STUN.
|
||||||
turnDone = true;
|
turnDone = true;
|
||||||
@ -454,17 +460,29 @@ function updateInfoDiv() {
|
|||||||
}
|
}
|
||||||
var div = getInfoDiv();
|
var div = getInfoDiv();
|
||||||
div.innerHTML = contents + "</pre>";
|
div.innerHTML = contents + "</pre>";
|
||||||
|
|
||||||
|
for (var msg in infoDivErrors) {
|
||||||
|
div.innerHTML += '<p style="background-color: red; color: yellow;">' +
|
||||||
|
infoDivErrors[msg] + '</p>';
|
||||||
|
}
|
||||||
|
if (infoDivErrors.length)
|
||||||
|
showInfoDiv();
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleInfoDivDisplay() {
|
function toggleInfoDiv() {
|
||||||
var div = getInfoDiv();
|
var div = getInfoDiv();
|
||||||
if (div.style.display == "block") {
|
if (div.style.display == "block") {
|
||||||
div.style.display = "none";
|
div.style.display = "none";
|
||||||
} else {
|
} else {
|
||||||
div.style.display = "block";
|
showInfoDiv();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showInfoDiv() {
|
||||||
|
var div = getInfoDiv();
|
||||||
|
div.style.display = "block";
|
||||||
|
}
|
||||||
|
|
||||||
function toggleVideoMute() {
|
function toggleVideoMute() {
|
||||||
// Call the getVideoTracks method via adapter.js.
|
// Call the getVideoTracks method via adapter.js.
|
||||||
videoTracks = localStream.getVideoTracks();
|
videoTracks = localStream.getVideoTracks();
|
||||||
@ -533,7 +551,7 @@ document.onkeydown = function(event) {
|
|||||||
toggleVideoMute();
|
toggleVideoMute();
|
||||||
return false;
|
return false;
|
||||||
case 73:
|
case 73:
|
||||||
toggleInfoDivDisplay();
|
toggleInfoDiv();
|
||||||
return false;
|
return false;
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user