Reputation: 16693
I'm trying to set the camera (and <video>
) size to landscape using this code provided by MDN documentation:
var constraints = {
audio: true,
video: { width: 320, height: 180 }
};
navigator.mediaDevices.getUserMedia(constraints).then {...}
Now while this works perfectly on all browsers, for some reason, when the device is on portrait mode, Samsung browser (current version is 9.2) displays the camera input as portrait mode, diregarding my size constraints.
I've tried using exact
, min
and require
, but the results are the same.
When the device is rotated, and is in landscape orientation, the camera is displayed with the correct sizes.
Any ideas how to resolve this issue or to workaround it?
Upvotes: 1
Views: 473