Added new create-offer and ice-servers demos to test the exact output of createOffer and .onicecandidate.

Updated a few demos to work on Firefox.

R=dutton@google.com

Review URL: https://webrtc-codereview.appspot.com/1581006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5464 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
juberti@webrtc.org
2014-01-30 23:38:44 +00:00
parent bda5fa77af
commit 5db9a3f32a
9 changed files with 358 additions and 103 deletions

View File

@@ -27,15 +27,15 @@ function openCamera() {
if (mystream) {
mystream.stop();
}
navigator.webkitGetUserMedia(cameraConstraints(), gotStream, function() {
navigator.getUserMedia(cameraConstraints(), gotStream, function() {
log("GetUserMedia failed");
});
}
}
function gotStream(stream) {
log("GetUserMedia succeeded");
mystream = stream;
$("local-video").src = webkitURL.createObjectURL(stream);
attachMediaStream($("local-video"), stream);
}
function cameraConstraints() {
@@ -73,8 +73,8 @@ function streamConstraints() {
}
function connect() {
pc1 = new webkitRTCPeerConnection(null);
pc2 = new webkitRTCPeerConnection(null);
pc1 = new RTCPeerConnection(null);
pc2 = new RTCPeerConnection(null);
pc1.addStream(mystream, streamConstraints());
log('PC1 creating offer');
pc1.onnegotiationeeded = function() {
@@ -97,7 +97,7 @@ function connect() {
}
pc2.onaddstream = function(e) {
log('PC2 got stream');
$('remote-video').src = webkitURL.createObjectURL(e.stream);
attachMediaStream($('remote-video'), e.stream);
log('Remote video is ' + $('remote-video').src);
}
pc1.createOffer(function(desc) {
@@ -280,7 +280,7 @@ function dumpStats(obj) {
}
return statsString;
}
// Utility to show the value of a field in a span called name+Display
function showValue(name, value) {