Browse Source

Update comm.js

pull/26/head
Amir 7 years ago committed by GitHub
parent
commit
7cb7d8c261
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      js/comm.js

8
js/comm.js

@ -570,8 +570,8 @@ function startCall(isCaller){ @@ -570,8 +570,8 @@ function startCall(isCaller){
//When remote stream becomes available
myPC.ontrack = function(e){
// document.getElementById("peerVid").src = window.URL.createObjectURL(e.streams[0]);
document.getElementById("peerVid").src = window.HTMLMediaElement.srcObject(e.streams[0]);
document.getElementById("peerVid").src = window.URL.createObjectURL(e.streams[0]);
// document.getElementById("peerVid").src = window.HTMLMediaElement.srcObject(e.streams[0]);
};
@ -636,8 +636,8 @@ function setLocalMedia(streamConstraints, isCaller){ @@ -636,8 +636,8 @@ function setLocalMedia(streamConstraints, isCaller){
navigator.mediaDevices.getUserMedia(
streamConstraints
).then(function(myStream){
// document.getElementById("myVid").src = window.URL.createObjectURL(myStream);
document.getElementById("myVid").src = window.HTMLMediaElement.srcObject(myStream);
document.getElementById("myVid").src = window.URL.createObjectURL(myStream);
// document.getElementById("myVid").src = window.HTMLMediaElement.srcObject(myStream);
myPC.addStream(myStream);//add my stream to RTCPeerConnection

Loading…
Cancel
Save