Constrain Proportions 4:3

I am trying to enforce a 4:3 capture with getUserMedia, but it doesn’t seem to work. The video feed is always 16:9 in landscape and 9:16 in portrait. I am trying with various properties for getUserMedia: video but none of them seem to be recognized or accepted (width, minWidth, maxWidth, aspectRatio, etc.).

I have tested the device (iPad, in this case) against this sample:

…and can indeed force 4:3 when selecting the VGA option.

I am not sure what is missing to specify 4:3 capture with react-native-webrtc. Any help would be appreciated!


The constraint doesn’t work because the video capture class doesn’t use constraints, you can fix it by adding code to VideoCaptureController.m.

However, even if it is modified, it seems that the resolution control is still limited. It is recommended to modify the coverage mode of the displayed view to achieve the effect you need to display.

Thank you that is what I needed to know.