I am capturing the screen with this:
w.navigator.mediaDevices.getUserMedia({
video: {mediaSource:'screen'}
}).then(function (stream) {
...
}, function(aReason) {
console.error('failed, aReason:', aReason);
});
However it is full screen. If I set height
and width
like this video: {mediaSource:'screen', height:100, width: 100}
, it is still of full screen but scaled down to 100x100. Is there any way to set dimensions, like top, left, width, and height of the portion of the screen to capture?
This is what i am trying to acheive. This is my full screen right now and this is what gUM gives me:
http://i.imgur.com/9Wy7SSS.png
I want to set the x, y, x2, y2, so it takes a porition like this:
For a single screenshot, I can do the processing after the recording, but with a video recording it is hard to do this post processing, so I thought it would be good if there was some way to provide this before hand: