OLD | NEW |
---|---|
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script type="text/javascript" src="webrtc_test_utilities.js"></script> | 3 <script type="text/javascript" src="webrtc_test_utilities.js"></script> |
4 <script type="text/javascript" src="webrtc_test_audio.js"></script> | 4 <script type="text/javascript" src="webrtc_test_audio.js"></script> |
5 <script type="text/javascript"> | 5 <script type="text/javascript"> |
6 $ = function(id) { | 6 $ = function(id) { |
7 return document.getElementById(id); | 7 return document.getElementById(id); |
8 }; | 8 }; |
9 | 9 |
10 var gFirstConnection = null; | 10 var gFirstConnection = null; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
46 'inline:d0RmdmcmVCspeEc3QGZiNWpVLFJhQX1cfHAwJSoj', | 46 'inline:d0RmdmcmVCspeEc3QGZiNWpVLFJhQX1cfHAwJSoj', |
47 'data': 'a=crypto:1 AES_CM_128_HMAC_SHA1_80 ' + | 47 'data': 'a=crypto:1 AES_CM_128_HMAC_SHA1_80 ' + |
48 'inline:NzB4d1BINUAvLEw6UzF3WSJ+PSdFcGdUJShpX1Zj' | 48 'inline:NzB4d1BINUAvLEw6UzF3WSJ+PSdFcGdUJShpX1Zj' |
49 }; | 49 }; |
50 | 50 |
51 // When using GICE, the ICE credentials can be chosen by javascript. | 51 // When using GICE, the ICE credentials can be chosen by javascript. |
52 var EXTERNAL_GICE_UFRAG = '1234567890123456'; | 52 var EXTERNAL_GICE_UFRAG = '1234567890123456'; |
53 var EXTERNAL_GICE_PWD = '123456789012345678901234'; | 53 var EXTERNAL_GICE_PWD = '123456789012345678901234'; |
54 | 54 |
55 setAllEventsOccuredHandler(reportTestSuccess); | 55 setAllEventsOccuredHandler(reportTestSuccess); |
56 | 56 |
phoglund_chromium
2014/03/28 12:43:34
Nit: remove
perkj_chrome
2014/03/31 08:13:32
Done.
| |
57 // Test that we can setup call with an audio and video track. | 57 // Test that we can setup call with an audio and video track. |
58 function call(constraints) { | 58 function call(constraints) { |
59 createConnections(null); | 59 createConnections(null); |
60 navigator.webkitGetUserMedia(constraints, | 60 navigator.webkitGetUserMedia(constraints, |
61 addStreamToBothConnectionsAndNegotiate, printGetUserMediaError); | 61 addStreamToBothConnectionsAndNegotiate, printGetUserMediaError); |
62 waitForVideo('remote-view-1'); | 62 waitForVideo('remote-view-1'); |
63 waitForVideo('remote-view-2'); | 63 waitForVideo('remote-view-2'); |
64 } | 64 } |
65 | 65 |
66 // Test that we can setup call with an audio and video track and check that | |
67 // the video resolution is as expected. | |
68 function callAndExpectResolution(constraints, | |
69 expected_width, | |
70 expected_height) { | |
71 createConnections(null); | |
72 navigator.webkitGetUserMedia(constraints, | |
73 addStreamToBothConnectionsAndNegotiate, printGetUserMediaError); | |
74 waitForVideoWithResolution('remote-view-1', | |
75 expected_width, | |
76 expected_height); | |
77 waitForVideoWithResolution('remote-view-2', | |
78 expected_width, | |
79 expected_height); | |
80 } | |
81 | |
82 | |
66 // First calls without streams on any connections, and then adds a stream | 83 // First calls without streams on any connections, and then adds a stream |
67 // to peer connection 1 which gets sent to peer connection 2. We must wait | 84 // to peer connection 1 which gets sent to peer connection 2. We must wait |
68 // for the first negotiation to complete before starting the second one, which | 85 // for the first negotiation to complete before starting the second one, which |
69 // is why we wait until the connection is stable before re-negotiating. | 86 // is why we wait until the connection is stable before re-negotiating. |
70 function callEmptyThenAddOneStreamAndRenegotiate(constraints) { | 87 function callEmptyThenAddOneStreamAndRenegotiate(constraints) { |
71 createConnections(null); | 88 createConnections(null); |
72 negotiate(); | 89 negotiate(); |
73 waitForConnectionToStabilize(gFirstConnection, function() { | 90 waitForConnectionToStabilize(gFirstConnection, function() { |
74 navigator.webkitGetUserMedia(constraints, | 91 navigator.webkitGetUserMedia(constraints, |
75 addStreamToTheFirstConnectionAndNegotiate, printGetUserMediaError); | 92 addStreamToTheFirstConnectionAndNegotiate, printGetUserMediaError); |
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
840 <td><canvas width="320" height="240" id="remote-view-2-canvas" | 857 <td><canvas width="320" height="240" id="remote-view-2-canvas" |
841 style="display:none"></canvas></td> | 858 style="display:none"></canvas></td> |
842 <td><canvas width="320" height="240" id="remote-view-3-canvas" | 859 <td><canvas width="320" height="240" id="remote-view-3-canvas" |
843 style="display:none"></canvas></td> | 860 style="display:none"></canvas></td> |
844 <td><canvas width="320" height="240" id="remote-view-4-canvas" | 861 <td><canvas width="320" height="240" id="remote-view-4-canvas" |
845 style="display:none"></canvas></td> | 862 style="display:none"></canvas></td> |
846 </tr> | 863 </tr> |
847 </table> | 864 </table> |
848 </body> | 865 </body> |
849 </html> | 866 </html> |
OLD | NEW |