pc_forward.html [246:290]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } // pc2.setLocal finished, call pc1.setRemote function step5() { pc2.onicecandidate = function(obj) { if (obj.candidate) { log("pc2 found ICE candidate: " + JSON.stringify(obj.candidate)); pc1.addIceCandidate(obj.candidate); } else { log("pc2 got end-of-candidates signal"); } } pc1.setRemoteDescription(pc2_answer, step6, failed); } // pc1.setRemote finished, media should be running! function step6() { log("HIP HIP HOORAY"); } function start() { button.innerHTML = "Stop!"; button.onclick = stop; pc1 = new RTCPeerConnection(); pc2 = new RTCPeerConnection(); pc1.onaddstream = function(obj) { log("pc1 got remote stream from pc2 " + obj.type); pc1video.mozSrcObject = obj.stream; pc1video.play(); setTimeout(pc1video.play, 1000); } pc2.onaddstream = function(obj) { log("pc2 got remote stream from pc1 " + obj.type); pc2video.mozSrcObject = obj.stream; pc2video.play(); setTimeout(pc2video.play, 1000); } var myrequest = { audio: true }; if (!(audio_only.checked)) { myrequest = { audio: true, video: true }; } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - pc_test_h264.html [193:237]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } // pc2.setLocal finished, call pc1.setRemote function step5() { pc2.onicecandidate = function(obj) { if (obj.candidate) { log("pc2 found ICE candidate: " + JSON.stringify(obj.candidate)); pc1.addIceCandidate(obj.candidate); } else { log("pc2 got end-of-candidates signal"); } } pc1.setRemoteDescription(pc2_answer, step6, failed); } // pc1.setRemote finished, media should be running! function step6() { log("HIP HIP HOORAY"); } function start() { button.innerHTML = "Stop!"; button.onclick = stop; pc1 = new RTCPeerConnection(); pc2 = new RTCPeerConnection(); pc1.onaddstream = function(obj) { log("pc1 got remote stream from pc2 " + obj.type); pc1video.mozSrcObject = obj.stream; pc1video.play(); setTimeout(pc1video.play, 1000); } pc2.onaddstream = function(obj) { log("pc2 got remote stream from pc1 " + obj.type); pc2video.mozSrcObject = obj.stream; pc2video.play(); setTimeout(pc2video.play, 1000); } var myrequest = { audio: true }; if (!(audio_only.checked)) { myrequest = { audio: true, video: true }; } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -