RTCEAGLVideoView aspect mode aspect fit (as we have for UIImageView)

andrew.n

Member
Context: I start the two-way streaming service by calling User B (iPhone) from User A (macOS - Chrome browser). On the iPhone, I display two RTCEAGLVideoView, one for broadcasting and one for playing remote streaming. The problem is that on my mac I start the call in landscape and on iPhone, I display the main RTCEAGLVideoView same size as the device (align top, leading, padding, bottom = 0).

How can I handle landscape videos to fit in RTCEAGLVideoView, no matter the size :)?
 

Max

Administrator
Staff member
Good day.
Please look at this thread. We do not support RTCMTLVideoView which is recommended as possible solution because this is still less stable than RTCEAGLVideoView. But you can try AVMakeRectWithAspectRatioInsideRect to prevent distortion as topic starter does.
 

andrew.n

Member
Thanks Max for your answer but WebRTC developed by Google is deprecated - I cannot consider this as a long term solution.
In the topic you recommended, as I understood, AVMakeRectWithAspectRatioInsideRect is not working properly...
Do you have any recommendations about how to use AVMakeRectWithAspectRatioInsideRect in delegate method
- (void)videoView: (RTCEAGLVideoView *)videoView didChangeVideoSize: (CGSize)size; ?
 

Max

Administrator
Staff member
We raised internal ticket WCS-2794 to update libwebrtc in iOS SDK. Please note that this take a much time due to more priority tasks.
 
Top