diff --git a/samples/js/base/adapter.js b/samples/js/base/adapter.js index 5441a6c892..4294f34d88 100644 --- a/samples/js/base/adapter.js +++ b/samples/js/base/adapter.js @@ -4,6 +4,14 @@ var attachMediaStream = null; var reattachMediaStream = 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) { console.log("This appears to be Firefox"); diff --git a/samples/js/demos/html/multiple.html b/samples/js/demos/html/multiple.html index 81d768e7d0..e5b8a0bec3 100644 --- a/samples/js/demos/html/multiple.html +++ b/samples/js/demos/html/multiple.html @@ -44,14 +44,6 @@ var sdpConstraints = {'mandatory': { 'OfferToReceiveAudio':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){ trace("Received local stream"); // Call the polyfill wrapper to attach the media stream to this element. diff --git a/samples/js/demos/html/pc1.html b/samples/js/demos/html/pc1.html index 0a3e81e3a9..61dc6a997b 100644 --- a/samples/js/demos/html/pc1.html +++ b/samples/js/demos/html/pc1.html @@ -43,13 +43,6 @@ var localstream; var sdpConstraints = {'mandatory': { 'OfferToReceiveAudio':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){ trace("Received local stream");