|
|
|
|
@ -240,13 +240,22 @@ define(['jquery', 'underscore', 'audiocontext', 'webrtc.adapter'], function($, _
@@ -240,13 +240,22 @@ define(['jquery', 'underscore', 'audiocontext', 'webrtc.adapter'], function($, _
|
|
|
|
|
|
|
|
|
|
UserMedia.prototype.addToPeerConnection = function(pc) { |
|
|
|
|
|
|
|
|
|
console.log("Add stream to peer connection", pc, this.localStream); |
|
|
|
|
console.log("Add usermedia stream to peer connection", pc, this.localStream); |
|
|
|
|
if (this.localStream) { |
|
|
|
|
pc.addStream(this.localStream); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
UserMedia.prototype.removeFromPeerConnection = function(pc) { |
|
|
|
|
|
|
|
|
|
console.log("Remove usermedia stream from peer connection", pc, this.localStream); |
|
|
|
|
if (this.localStream) { |
|
|
|
|
pc.removeStream(this.localStream); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
UserMedia.prototype.attachMediaStream = function(video) { |
|
|
|
|
|
|
|
|
|
//console.log("attach", video, this.localStream);
|
|
|
|
|
|