Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8963)

Unified Diff: chrome/test/data/webrtc/manual/constraints.js

Issue 18769010: Updated Chrome Test pages to use adapter.js (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/data/webrtc/manual/constraints.html ('k') | chrome/test/data/webrtc/manual/peerconnection.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webrtc/manual/constraints.js
===================================================================
--- chrome/test/data/webrtc/manual/constraints.js (revision 210952)
+++ chrome/test/data/webrtc/manual/constraints.js (working copy)
@@ -12,18 +12,18 @@
/**
* 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, getUserMediaOkCallback_,
+ getUserMediaFailedCallback_);
}
// Internals
@@ -104,7 +104,7 @@
function getUserMediaOkCallback_(stream) {
gLocalStream = stream;
var videoTag = $('local-view');
- videoTag.src = webkitURL.createObjectURL(stream);
+ attachMediaStream(videoTag, stream);
// Due to crbug.com/110938 the size is 0 when onloadedmetadata fires.
// videoTag.onloadedmetadata = updateVideoTagSize_(videoTag);
« no previous file with comments | « chrome/test/data/webrtc/manual/constraints.html ('k') | chrome/test/data/webrtc/manual/peerconnection.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698