From ecfd32880ed6c8c35a7fc1dfaba84f7d7df38f38 Mon Sep 17 00:00:00 2001 From: "hta@webrtc.org" Date: Tue, 19 Mar 2013 08:45:47 +0000 Subject: [PATCH] Changed stats reporting to not use local/remote BUG= Review URL: https://webrtc-codereview.appspot.com/1216004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3688 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../js/demos/html/constraints-and-stats.html | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/samples/js/demos/html/constraints-and-stats.html b/samples/js/demos/html/constraints-and-stats.html index ea305a1f6..6f251a12a 100644 --- a/samples/js/demos/html/constraints-and-stats.html +++ b/samples/js/demos/html/constraints-and-stats.html @@ -125,17 +125,21 @@ var statCollector = setInterval(function() { log('Raw results ' + results); for (var i = 0; i < results.length; ++i) { var res = results[i]; - log(i + ': ' + JSON.stringify(res)); statsString += '

Report '; statsString += i; statsString += '

'; - if (res.local) { - statsString += "

Local "; - statsString += dumpStats(res.local); - } - if (res.remote) { - statsString += "

Remote "; - statsString += dumpStats(res.remote); + if (!res.local || res.local === res) { + statsString += dumpStats(res); + } else { + // Pre-227.0.1445 (188719) browser + if (res.local) { + statsString += "

Local "; + statsString += dumpStats(res.local); + } + if (res.remote) { + statsString += "

Remote "; + statsString += dumpStats(res.remote); + } } } $('stats').innerHTML = statsString;