Hi,
Let's assume I've a UIView with size 400px width x 300px height, and I
want to render a RTCVideoTrack of 600px width x 300px height in a way
that the video may be clipped to fill the UIView’s bounds.
I don't know how to make it work. In fact the videoTrack is always
stretched (deformed).
Basically I want the same behavior as the CSS "object-fit: cover",
which is shown here:
http://jsbin.com/yaheka/edit?html,css,output
Is there something I can do to mimic that behavior?
Swift code:
----------------------------
var view: RTCEAGLVideoView
view.frame = CGRectMake(
CGFloat(left),
CGFloat(top),
CGFloat(400),
CGFloat(300)
)
rtcVideoTrack.addRenderer(view);
// TODO: Make the video fill/cover the view.
// This does not work:
view.contentMode = UIViewContentMode.ScaleAspectFill
------------------------------
--
Iñaki Baz Castillo
<
i...@aliax.net>