Merge pull request #440 from maraoz/video/resolution
set smallest video resolution
This commit is contained in:
commit
2fea089432
1 changed files with 11 additions and 3 deletions
|
|
@ -13,10 +13,18 @@ var Video = function() {
|
||||||
Video.prototype.setOwnPeer = function(peer, wallet, cb) {
|
Video.prototype.setOwnPeer = function(peer, wallet, cb) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
navigator.getUserMedia({
|
var VWIDTH = 320;
|
||||||
|
var VHEIGHT = 320;
|
||||||
|
var constraints = {
|
||||||
audio: true,
|
audio: true,
|
||||||
video: true
|
video: {
|
||||||
}, function(stream) {
|
mandatory: {
|
||||||
|
maxWidth: VWIDTH,
|
||||||
|
maxHeight: VHEIGHT,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
navigator.getUserMedia(constraints, function(stream) {
|
||||||
// This is called when user accepts using webcam
|
// This is called when user accepts using webcam
|
||||||
self.localStream = stream;
|
self.localStream = stream;
|
||||||
var online = wallet.getOnlinePeerIDs();
|
var online = wallet.getOnlinePeerIDs();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue