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

Unified Diff: trunk/src/chrome/test/data/webrtc/getusermedia.js

Issue 22840006: Revert 217770 "Landing https://codereview.chromium.org/18769010/." (Closed) Base URL: svn://svn.chromium.org/chrome/
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 | « trunk/src/chrome/test/data/webrtc/adapter.js ('k') | trunk/src/chrome/test/data/webrtc/jsep01_call.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/chrome/test/data/webrtc/getusermedia.js
===================================================================
--- trunk/src/chrome/test/data/webrtc/getusermedia.js (revision 217806)
+++ trunk/src/chrome/test/data/webrtc/getusermedia.js (working copy)
@@ -39,8 +39,8 @@
* and optional constraints defined. The contents of this parameter depends
* on the WebRTC version. This should be JavaScript code that we eval().
*/
-function doGetUserMedia(constraints) {
- if (!getUserMedia) {
+function getUserMedia(constraints) {
+ if (!navigator.webkitGetUserMedia) {
returnToTest('Browser does not support WebRTC.');
return;
}
@@ -50,14 +50,15 @@
} catch (exception) {
throw failTest('Not valid JavaScript expression: ' + constraints);
}
- debug('Requesting doGetUserMedia: constraints: ' + constraints);
- getUserMedia(evaluatedConstraints, getUserMediaOkCallback_,
- getUserMediaFailedCallback_);
+ debug('Requesting getUserMedia: constraints: ' + constraints);
+ navigator.webkitGetUserMedia(evaluatedConstraints,
+ getUserMediaOkCallback_,
+ getUserMediaFailedCallback_);
returnToTest('ok-requested');
}
/**
- * Must be called after calling doGetUserMedia.
+ * Must be called after calling getUserMedia.
* @return {string} Returns not-called-yet if we have not yet been called back
* by WebRTC. Otherwise it returns either ok-got-stream or
* failed-with-error-x (where x is the error code from the error
@@ -131,7 +132,7 @@
function getUserMediaOkCallback_(stream) {
gLocalStream = stream;
var videoTag = $('local-view');
- attachMediaStream(videoTag, stream);
+ videoTag.src = webkitURL.createObjectURL(stream);
// Due to crbug.com/110938 the size is 0 when onloadedmetadata fires.
// videoTag.onloadedmetadata = displayVideoSize_(videoTag);.
« no previous file with comments | « trunk/src/chrome/test/data/webrtc/adapter.js ('k') | trunk/src/chrome/test/data/webrtc/jsep01_call.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698