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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 | 51 |
52 // Test that we can setup call with an audio and video track. | 52 // Test that we can setup call with an audio and video track. |
53 function call(constraints) { | 53 function call(constraints) { |
54 createConnections(null); | 54 createConnections(null); |
55 navigator.webkitGetUserMedia(constraints, | 55 navigator.webkitGetUserMedia(constraints, |
56 addStreamToBothConnectionsAndNegotiate, printGetUserMediaError); | 56 addStreamToBothConnectionsAndNegotiate, printGetUserMediaError); |
57 waitForVideo('remote-view-1'); | 57 waitForVideo('remote-view-1'); |
58 waitForVideo('remote-view-2'); | 58 waitForVideo('remote-view-2'); |
59 } | 59 } |
60 | 60 |
| 61 // Test that we can setup a call with a video track and that the remote peer |
| 62 // receives black frames if the local video track is disabled. |
| 63 function callAndDisableLocalVideo(constraints) { |
| 64 createConnections(null); |
| 65 navigator.webkitGetUserMedia(constraints, |
| 66 addStreamToBothConnectionsAndNegotiate, printGetUserMediaError); |
| 67 detectVideoPlaying('remote-view-1', |
| 68 function () { |
| 69 assertEquals(gLocalStream.getVideoTracks().length, 1); |
| 70 gLocalStream.getVideoTracks()[0].enabled = false; |
| 71 waitForBlackVideo('remote-view-1'); |
| 72 }); |
| 73 } |
| 74 |
61 // Test that we can setup call with an audio and video track and check that | 75 // Test that we can setup call with an audio and video track and check that |
62 // the video resolution is as expected. | 76 // the video resolution is as expected. |
63 function callAndExpectResolution(constraints, | 77 function callAndExpectResolution(constraints, |
64 expected_width, | 78 expected_width, |
65 expected_height) { | 79 expected_height) { |
66 createConnections(null); | 80 createConnections(null); |
67 navigator.webkitGetUserMedia(constraints, | 81 navigator.webkitGetUserMedia(constraints, |
68 addStreamToBothConnectionsAndNegotiate, printGetUserMediaError); | 82 addStreamToBothConnectionsAndNegotiate, printGetUserMediaError); |
69 waitForVideoWithResolution('remote-view-1', | 83 waitForVideoWithResolution('remote-view-1', |
70 expected_width, | 84 expected_width, |
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
917 <td><canvas width="320" height="240" id="remote-view-2-canvas" | 931 <td><canvas width="320" height="240" id="remote-view-2-canvas" |
918 style="display:none"></canvas></td> | 932 style="display:none"></canvas></td> |
919 <td><canvas width="320" height="240" id="remote-view-3-canvas" | 933 <td><canvas width="320" height="240" id="remote-view-3-canvas" |
920 style="display:none"></canvas></td> | 934 style="display:none"></canvas></td> |
921 <td><canvas width="320" height="240" id="remote-view-4-canvas" | 935 <td><canvas width="320" height="240" id="remote-view-4-canvas" |
922 style="display:none"></canvas></td> | 936 style="display:none"></canvas></td> |
923 </tr> | 937 </tr> |
924 </table> | 938 </table> |
925 </body> | 939 </body> |
926 </html> | 940 </html> |
OLD | NEW |