Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | <!DOCTYPE html> |
michael@0 | 2 | <html class="reftest-wait"> |
michael@0 | 3 | <!-- |
michael@0 | 4 | https://bugzilla.mozilla.org/show_bug.cgi?id=863929 |
michael@0 | 5 | --> |
michael@0 | 6 | <head> |
michael@0 | 7 | <meta charset="utf-8"> |
michael@0 | 8 | <title>Bug 863929</title> |
michael@0 | 9 | <script type="application/javascript"> |
michael@0 | 10 | var pc1, pc2, pc1_offer, pc2_answer; |
michael@0 | 11 | |
michael@0 | 12 | function onFailure(code) { |
michael@0 | 13 | stop(); |
michael@0 | 14 | } |
michael@0 | 15 | |
michael@0 | 16 | function stop() { |
michael@0 | 17 | pc1.close(); |
michael@0 | 18 | pc1 = null; |
michael@0 | 19 | pc2.close(); |
michael@0 | 20 | pc2 = null; |
michael@0 | 21 | document.documentElement.removeAttribute("class"); |
michael@0 | 22 | } |
michael@0 | 23 | |
michael@0 | 24 | function step1(offer) { |
michael@0 | 25 | pc1_offer = offer; |
michael@0 | 26 | pc1_offer.sdp = 'v=0\r\no=Mozilla-SIPUA 2208 0 IN IP4 0.0.0.0\r\ns=SIP Call\r\nt=0 0\r\na=ice-ufrag:96e36277\r\na=ice-pwd:4450d5a4a5f097855c16fa079893be18\r\na=fingerprint:sha-256 23:9A:2E:43:94:42:CF:46:68:FC:62:F9:F4:48:61:DB:2F:8C:C9:FF:6B:25:54:9D:41:09:EF:83:A8:19:FC:B6\r\nm=audio 56187 RTP/SAVPF 109 0 8 101\r\nc=IN IP4 77.9.79.167\r\na=rtpmap:109 opus/48000/2\r\na=ptime:20\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:101 telephone-event/8000\r\na=fmtp:101 0-15\r\na=sendrecv\r\na=candidate:0 1 UDP 2113601791 192.168.178.20 56187 typ host\r\na=candidate:1 1 UDP 1694236671 77.9.79.167 56187 typ srflx raddr 192.168.178.20 rport 56187\r\na=candidate:0 2 UDP 2113601790 192.168.178.20 52955 typ host\r\na=candidate:1 2 UDP 1694236670 77.9.79.167 52955 typ srflx raddr 192.168.178.20 rport 52955\r\nm=video 49929 RTP/SAVPF 120\r\nc=IN IP4 77.9.79.167\r\na=rtpmap:120 telephone-event/90000\r\na=recvonly\r\na=candidate:0 1 UDP 2113601791 192.168.178.20 49929 typ host\r\na=candidate:1 1 UDP 1694236671 77.9.79.167 49929 typ srflx raddr 192.168.178.20 rport 49929\r\na=candidate:0 2 UDP 2113601790 192.168.178.20 50769 typ host\r\na=candidate:1 2 UDP 1694236670 77.9.79.167 50769 typ srflx raddr 192.168.178.20 rport 50769\r\nm=application 54054 SCTP/DTLS 5000 \r\nc=IN IP4 77.9.79.167\r\na=fmtp:5000 protocol=webrtc-datachannel;streams=16\r\na=sendrecv\r\n'; |
michael@0 | 27 | pc1.setLocalDescription(pc1_offer, step2, onFailure); |
michael@0 | 28 | } |
michael@0 | 29 | |
michael@0 | 30 | function step2() { |
michael@0 | 31 | pc2.setRemoteDescription(pc1_offer, step3, onFailure); |
michael@0 | 32 | } |
michael@0 | 33 | |
michael@0 | 34 | function step3() { |
michael@0 | 35 | pc2.createAnswer(step4, onFailure); |
michael@0 | 36 | } |
michael@0 | 37 | |
michael@0 | 38 | function step4(answer) { |
michael@0 | 39 | pc2_answer = answer; |
michael@0 | 40 | pc2.setLocalDescription(pc2_answer, step5, onFailure); |
michael@0 | 41 | } |
michael@0 | 42 | |
michael@0 | 43 | function step5() { |
michael@0 | 44 | pc1.setRemoteDescription(pc2_answer, step6, onFailure); |
michael@0 | 45 | } |
michael@0 | 46 | |
michael@0 | 47 | function step6() { |
michael@0 | 48 | stop(); |
michael@0 | 49 | } |
michael@0 | 50 | |
michael@0 | 51 | function start() { |
michael@0 | 52 | pc1 = new mozRTCPeerConnection(); |
michael@0 | 53 | pc2 = new mozRTCPeerConnection(); |
michael@0 | 54 | navigator.mozGetUserMedia({audio:true, video:true, fake:true}, function(s) { |
michael@0 | 55 | pc1.addStream(s); |
michael@0 | 56 | navigator.mozGetUserMedia({audio:true, video:true, fake:true}, function(s) { |
michael@0 | 57 | pc2.addStream(s); |
michael@0 | 58 | pc1.createOffer(step1, onFailure); |
michael@0 | 59 | }, onFailure); |
michael@0 | 60 | }, onFailure); |
michael@0 | 61 | } |
michael@0 | 62 | </script> |
michael@0 | 63 | </head> |
michael@0 | 64 | |
michael@0 | 65 | <body onload="start()"> |
michael@0 | 66 | </html> |