Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Unified Diff: tools/perf/page_sets/third_party/webrtc/samples/js/demos/html/pc1.html

Issue 561803002: Implements peer connection stats measurements in WebRTC call test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@telemetry
Patch Set: Now tracking peer connections for all webrtc pages. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/perf/page_sets/third_party/webrtc/samples/js/demos/html/pc1.html
diff --git a/tools/perf/page_sets/third_party/webrtc/samples/js/demos/html/pc1.html b/tools/perf/page_sets/third_party/webrtc/samples/js/demos/html/pc1.html
index f2cf4d03354b63b999a8365bd46826ef4c81e4f7..e00c78865636d7933a084f5e201f4a2f1eef57a1 100644
--- a/tools/perf/page_sets/third_party/webrtc/samples/js/demos/html/pc1.html
+++ b/tools/perf/page_sets/third_party/webrtc/samples/js/demos/html/pc1.html
@@ -41,8 +41,8 @@ btn3.disabled = true;
var pc1,pc2;
var localstream;
var sdpConstraints = {'mandatory': {
- 'OfferToReceiveAudio':true,
- 'OfferToReceiveVideo':true }};
+ 'OfferToReceiveAudio':true,
+ 'OfferToReceiveVideo':true }};
function gotStream(stream){
trace("Received local stream");
@@ -58,8 +58,8 @@ function start() {
// Call into getUserMedia via the polyfill (adapter.js).
getUserMedia({audio:true, video:true},
gotStream, function() {});
-}
-
+}
+
function call() {
btn2.disabled = true;
btn3.disabled = false;
@@ -67,21 +67,21 @@ function call() {
videoTracks = localstream.getVideoTracks();
audioTracks = localstream.getAudioTracks();
if (videoTracks.length > 0)
- trace('Using Video device: ' + videoTracks[0].label);
+ trace('Using Video device: ' + videoTracks[0].label);
if (audioTracks.length > 0)
trace('Using Audio device: ' + audioTracks[0].label);
var servers = null;
pc1 = new RTCPeerConnection(servers);
trace("Created local peer connection object pc1");
- pc1.onicecandidate = iceCallback1;
+ pc1.onicecandidate = iceCallback1;
pc2 = new RTCPeerConnection(servers);
trace("Created remote peer connection object pc2");
pc2.onicecandidate = iceCallback2;
- pc2.onaddstream = gotRemoteStream;
+ pc2.onaddstream = gotRemoteStream;
pc1.addStream(localstream);
trace("Adding Local Stream to peer connection");
-
+
pc1.createOffer(gotDescription1, onCreateSessionDescriptionError);
}
@@ -108,7 +108,7 @@ function gotDescription2(desc){
function hangup() {
trace("Ending call");
- pc1.close();
+ pc1.close();
pc2.close();
pc1 = null;
pc2 = null;
@@ -129,7 +129,7 @@ function iceCallback1(event){
trace("Local ICE candidate: \n" + event.candidate.candidate);
}
}
-
+
function iceCallback2(event){
if (event.candidate) {
pc1.addIceCandidate(new RTCIceCandidate(event.candidate),

Powered by Google App Engine
This is Rietveld 408576698