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:
@@ -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");
|
||||||
|
|
||||||
|
@@ -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.
|
||||||
|
@@ -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");
|
||||||
|
Reference in New Issue
Block a user