| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <meta charset="utf-8"> | 4 <meta charset="utf-8"> |
| 5 <title>WebRTC Simulcast Test</title> | 5 <title>WebRTC Simulcast Test</title> |
| 6 <style> | 6 <style> |
| 7 video { | 7 video { |
| 8 border:5px solid black; | 8 border:5px solid black; |
| 9 } | 9 } |
| 10 button { | 10 button { |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 renegotiateClient(); | 159 renegotiateClient(); |
| 160 } | 160 } |
| 161 | 161 |
| 162 function didntGetStream(err) { | 162 function didntGetStream(err) { |
| 163 returnToTest('Unexpectedly failed to acquire user media: ' + err); | 163 returnToTest('Unexpectedly failed to acquire user media: ' + err); |
| 164 } | 164 } |
| 165 | 165 |
| 166 function openCamera(width, height) { | 166 function openCamera(width, height) { |
| 167 if (localStream) { | 167 if (localStream) { |
| 168 pcClient.removeStream(localStream); | 168 pcClient.removeStream(localStream); |
| 169 localStream.stop(); | 169 localStream.getVideoTracks().stop(); |
| 170 localStream = null; | 170 localStream = null; |
| 171 } | 171 } |
| 172 navigator.webkitGetUserMedia({ | 172 navigator.webkitGetUserMedia({ |
| 173 audio: false, | 173 audio: false, |
| 174 video: {'mandatory': {'minWidth': width, 'maxWidth': width, | 174 video: {'mandatory': {'minWidth': width, 'maxWidth': width, |
| 175 'minHeight': height, 'maxHeight': height}} | 175 'minHeight': height, 'maxHeight': height}} |
| 176 }, gotStream, didntGetStream); | 176 }, gotStream, didntGetStream); |
| 177 } | 177 } |
| 178 | 178 |
| 179 function renegotiateClient() { | 179 function renegotiateClient() { |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 throw 'Expected to run in an automated context.'; | 234 throw 'Expected to run in an automated context.'; |
| 235 window.domAutomationController.send(message); | 235 window.domAutomationController.send(message); |
| 236 } | 236 } |
| 237 | 237 |
| 238 $ = function(id) { | 238 $ = function(id) { |
| 239 return document.getElementById(id); | 239 return document.getElementById(id); |
| 240 }; | 240 }; |
| 241 | 241 |
| 242 </script> | 242 </script> |
| 243 </body> | 243 </body> |
| OLD | NEW |