2

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:

Noitidart
  • 35,443
  • 37
  • 154
  • 323
  • 1
    Possible duplicate of [How to keep 1:1 aspect ratio video all the time in WebRTC](http://stackoverflow.com/questions/36961228/how-to-keep-11-aspect-ratio-video-all-the-time-in-webrtc) – jib Jun 09 '16 at 19:16
  • Hi @jib ! :) Actually that is something different. I added images to graphically show what I am trying to acheive. – Noitidart Jun 10 '16 at 02:43
  • 2
    Yes, cropping. Are you intending to do something with the result other than display it? If not, my answer to the other question should work. – jib Jun 10 '16 at 04:30
  • Thanks @jib yep cropping is exactly what I'm trying to do. I'm trying to provide users to see the x,y,x2,y2 of the recording. I then save it to file as `webm` I'll take a look at it agian, but it seem to require a playback element, I was right the array buffer straight. By the way are you the jib from moz irc #media? :) That source unavailble error is computer specific. I tetsed on my laptop and its working but my desktop no matter what won't work :( – Noitidart Jun 10 '16 at 06:44
  • I do hang out there yes. Good luck on your extension! – jib Jun 10 '16 at 11:27

0 Answers0