Moved trace function to adapter.js and removed from pc1 & multiple.html.

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3608 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
vikasmarwaha@webrtc.org
2013-03-05 03:35:26 +00:00
parent 24045c5a02
commit a856db26a6
3 changed files with 8 additions and 15 deletions

View File

@@ -4,6 +4,14 @@ var attachMediaStream = null;
var reattachMediaStream = null; var reattachMediaStream = null;
var webrtcDetectedBrowser = null; var webrtcDetectedBrowser = null;
function trace(text) {
// This function is used for logging.
if (text[text.length - 1] == '\n') {
text = text.substring(0, text.length - 1);
}
console.log((performance.now() / 1000).toFixed(3) + ": " + text);
}
if (navigator.mozGetUserMedia) { if (navigator.mozGetUserMedia) {
console.log("This appears to be Firefox"); console.log("This appears to be Firefox");

View File

@@ -44,14 +44,6 @@ var sdpConstraints = {'mandatory': {
'OfferToReceiveAudio':true, 'OfferToReceiveAudio':true,
'OfferToReceiveVideo':true }}; 'OfferToReceiveVideo':true }};
function trace(text) {
// This function is used for logging.
if (text[text.length - 1] == '\n') {
text = text.substring(0, text.length - 1);
}
console.log((performance.now() / 1000).toFixed(3) + ": " + text);
}
function gotStream(stream){ function gotStream(stream){
trace("Received local stream"); trace("Received local stream");
// Call the polyfill wrapper to attach the media stream to this element. // Call the polyfill wrapper to attach the media stream to this element.

View File

@@ -43,13 +43,6 @@ var localstream;
var sdpConstraints = {'mandatory': { var sdpConstraints = {'mandatory': {
'OfferToReceiveAudio':true, 'OfferToReceiveAudio':true,
'OfferToReceiveVideo':true }}; 'OfferToReceiveVideo':true }};
function trace(text) {
// This function is used for logging.
if (text[text.length - 1] == '\n') {
text = text.substring(0, text.length - 1);
}
console.log((performance.now() / 1000).toFixed(3) + ": " + text);
}
function gotStream(stream){ function gotStream(stream){
trace("Received local stream"); trace("Received local stream");