Merge pull request #440 from maraoz/video/resolution

set smallest video resolution
This commit is contained in:
Mario Colque 2014-05-20 17:33:46 -03:00
commit 2fea089432
1 changed files with 11 additions and 3 deletions

View File

@ -13,10 +13,18 @@ var Video = function() {
Video.prototype.setOwnPeer = function(peer, wallet, cb) {
var self = this;
navigator.getUserMedia({
var VWIDTH = 320;
var VHEIGHT = 320;
var constraints = {
audio: true,
video: true
}, function(stream) {
video: {
mandatory: {
maxWidth: VWIDTH,
maxHeight: VHEIGHT,
}
}
};
navigator.getUserMedia(constraints, function(stream) {
// This is called when user accepts using webcam
self.localStream = stream;
var online = wallet.getOnlinePeerIDs();