0

I am using react-native-webrtc-web-shim along with mediasoup for web rtc. Although I have a problem with getting correct sizes and aspect ratio. My problem is reproduceable when you try to use a react native ios camera with vertical camera mode and the other client is using the web. the aspect ratio when trying to blow up the screen is off. (I know I cant use the full width of the web screen when using react native vertical camera but how do I detect this?) I know I have to set the RTCView to the correct size but it does not fit the screen. I need to do something like discords viewing when video chatting.

I have tried to use videoTrack.getSettings() or videoTrack.getCapabilities but I often get something like 640 480. I have tried using '100%' in the styling but the screen is very small when using something like web to web. When using SCREEN_WIDTH or SCREEN_HEIGHT the vertical camera on IOS breaks obviously but I need a way to scale the video as much as possible

In summary, How would I do something like discords video viewing but with webrtc that somewhat fits the screen depending on the camera

Jonathan Coletti
  • 448
  • 4
  • 13

0 Answers0