pc_forward.html [229:263]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - pc2.createAnswer(step4, failed, answer_constraints); } // pc2.createAnswer finished, call pc2.setLocal function step4(answer) { log("Answer: " + sdpPrettyPrint(answer.sdp)); pc2_answer = answer; if ((requireh264.checked) && (!answer.sdp.match(/a=rtpmap:[0-9]+ H264/g))) { log("No H264 found in the answer!!!"); return; } if ((requireg722.checked) && (!answer.sdp.match(/a=rtpmap:[0-9]+ G722/g))) { log("No G722 found in the answer!!!"); return; } pc2.setLocalDescription(answer, step5, failed); } // 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() { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - pc_test_callbacks.html [250:284]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - pc2.createAnswer(step4, failed, answer_constraints); } // pc2.createAnswer finished, call pc2.setLocal function step4(answer) { log("Answer: " + sdpPrettyPrint(answer.sdp)); pc2_answer = answer; if ((requireh264.checked) && (!answer.sdp.match(/a=rtpmap:[0-9]+ H264/g))) { log("No H264 found in the answer!!!"); return; } if ((requireg722.checked) && (!answer.sdp.match(/a=rtpmap:[0-9]+ G722/g))) { log("No G722 found in the answer!!!"); return; } pc2.setLocalDescription(answer, step5, failed); } // 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() { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -