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

Unified Diff: chrome/common/extensions/docs/examples/api/desktopCapture/app.js

Issue 1321453004: Add maximum screen size into constraint for webkitGetuserMedia() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/docs/examples/api/desktopCapture/app.js
diff --git a/chrome/common/extensions/docs/examples/api/desktopCapture/app.js b/chrome/common/extensions/docs/examples/api/desktopCapture/app.js
index 70b492a17c9273cad07216f16292f9e19848ad0f..6445baff62b7a2828db00f751fa7ab0e44f8a57e 100644
--- a/chrome/common/extensions/docs/examples/api/desktopCapture/app.js
+++ b/chrome/common/extensions/docs/examples/api/desktopCapture/app.js
@@ -19,10 +19,15 @@ function onAccessApproved(id) {
console.log("Access rejected.");
return;
}
+
navigator.webkitGetUserMedia({
- audio:false,
- video: { mandatory: { chromeMediaSource: "desktop",
- chromeMediaSourceId: id } }
+ audio:false,
+ video: {
+ mandatory: {
+ chromeMediaSource: "desktop",
+ chromeMediaSourceId: id,
+ maxWidth:screen.width,
+ maxHeight:screen.height} }
}, gotStream, getUserMediaError);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698