title: Scale video view based on the aspect ratio
body: <p>I want to scale a video stream on devices with different screen sizes. The sender's video size can be different also.</p>
  
  <p>The code what I have till now:</p>
  
  <pre><code>public func videoView(_ videoView: RTCEAGLVideoView, didChangeVideoSize size: CGSize) {
          // scale by height
          let w = renderer.bounds.height * size.width / size.height
          let h = renderer.bounds.height
          let x = (w - renderer.bounds.width) / 2
          renderer.frame = CGRect(x: -x, y: 0, width: w, height: h)
      }
  </code></pre>
  
  <p>The renderer is a view where the video is rendered in. This scales, but not in the right way. Some part of the video is lost, the height is fine. But the width is cropped what I understand.</p>
  
  <p>Is it possible to achieve a solution that displays the video full screen (on the receiver side) without losing its aspect ratio?</p>