Index: manual/constraints.js |
=================================================================== |
--- manual/constraints.js (revision 188159) |
+++ manual/constraints.js (working copy) |
@@ -12,18 +12,19 @@ |
/** |
* Asks permission to use the webcam and mic from the browser. |
*/ |
-function getUserMedia() { |
+function doGetUserMedia() { |
+ // Call into getUserMedia via the polyfill (adapter.js). |
var constraints = getConstraints_(); |
var constraintsString = JSON.stringify(constraints, null, ' '); |
$('getusermedia-constraints').innerHTML = constraintsString; |
- if (!navigator.webkitGetUserMedia) { |
+ if (!getUserMedia) { |
log_('Browser does not support WebRTC.'); |
return; |
} |
log_('Requesting getUserMedia with constraints: ' + constraintsString); |
- navigator.webkitGetUserMedia(constraints, |
- getUserMediaOkCallback_, |
- getUserMediaFailedCallback_); |
+ getUserMedia(constraints, |
phoglund_chromium
2013/03/22 15:07:18
Nit: indentation.
elham1
2013/03/25 21:58:23
Done.
|
+ getUserMediaOkCallback_, |
+ getUserMediaFailedCallback_); |
} |
// Internals |
@@ -104,8 +105,7 @@ |
function getUserMediaOkCallback_(stream) { |
gLocalStream = stream; |
var videoTag = $('local-view'); |
- videoTag.src = webkitURL.createObjectURL(stream); |
- |
+ attachMediaStream(videoTag, stream); |
phoglund_chromium
2013/03/22 15:07:18
Nit: I wouldn't remove that blank line: it looks b
elham1
2013/03/25 21:58:23
Done.
|
// Due to crbug.com/110938 the size is 0 when onloadedmetadata fires. |
// videoTag.onloadedmetadata = updateVideoTagSize_(videoTag); |
// Use setTimeout as a workaround for now. |