OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script type="text/javascript" src="webrtc_test_utilities.js"></script> |
| 4 <script type="text/javascript"> |
| 5 $ = function(id) { |
| 6 return document.getElementById(id); |
| 7 }; |
| 8 |
| 9 function getUserMediaAndReturnVideoDimensions(constraints) { |
| 10 navigator.webkitGetUserMedia( |
| 11 constraints, gotStreamCallback, failedCallback); |
| 12 } |
| 13 |
| 14 function failedCallback(error) { |
| 15 failTest('GetUserMedia call failed with code ' + error.code); |
| 16 } |
| 17 |
| 18 function gotStreamCallback(stream) { |
| 19 var localView = $('local-view'); |
| 20 localView.src = URL.createObjectURL(stream); |
| 21 detectVideoPlaying('local-view', function() { |
| 22 sendValueToTest(localView.videoWidth + 'x' + localView.videoHeight); |
| 23 }); |
| 24 } |
| 25 </script> |
| 26 </head> |
| 27 <body> |
| 28 <table border="0"> |
| 29 <tr> |
| 30 <td><video id="local-view" autoplay="autoplay"> |
| 31 </video></td> |
| 32 <td><canvas id="local-view-canvas" style="display:none"></canvas></td> |
| 33 </tr> |
| 34 </table> |
| 35 </body> |
| 36 </html> |
OLD | NEW |