andrew.n
Member
I use 2 RTCEAGLVideoViews, one to play the remote link and one for broadcasting. When the streamers are ready, the delegate method - (void)videoView: (RTCEAGLVideoView *)videoView didChangeVideoSize: (CGSize)size; is called and I set the videoView.layer.frame properly.
We have the following setup:
RTCEAGLVideoView 1 height constraint = UIScreen.current.bounds.height
RTCEAGLVideoView 1 width constraint = UIScreen.current.bounds.width
RTCEAGLVideoView 1 center is UIViewController.view.center
RTCEAGLVideoView 2 height constraint = 170
RTCEAGLVideoView 2 width contraint = 100
RTCEAGLVideoView 2 center is a fixed point at X = 200, Y = 200
Until now everything works fine, the issue is that when I change the following:
RTCEAGLVideoView 1 height constraint = 170
RTCEAGLVideoView 1 width constraint = 100
RTCEAGLVideoView 1 center is a fixed point at X = 200, Y = 200
RTCEAGLVideoView 2 height constraint = UIScreen.current.bounds.height
RTCEAGLVideoView 2 width constraint = UIScreen.current.bounds.width
RTCEAGLVideoView 2 center is UIViewController.view.center
Basically, I replace those 2 RTCEAGLVideoView dimensions and centered position.
The issue is that when I do this, the streaming is distorted and randomly the delegate method (void)videoView: (RTCEAGLVideoView *)videoView didChangeVideoSize: (CGSize)size; is called again and the streaming is fixed. But sometimes this method is not called even if I wait few minutes.
How can I force this reload and the point when I change the dimensions and positions for both RTCEAGLVideoViews.
Small note regarding the configuration:
let options = FPWCSApi2StreamOptions()
let constraints = FPWCSApi2MediaConstraints(audio: true, videoWidth: Int(UIScreen.main.bounds.width), videoHeight: Int(UIScreen.main.bounds.height))
options.constraints = constraints
We have the following setup:
RTCEAGLVideoView 1 height constraint = UIScreen.current.bounds.height
RTCEAGLVideoView 1 width constraint = UIScreen.current.bounds.width
RTCEAGLVideoView 1 center is UIViewController.view.center
RTCEAGLVideoView 2 height constraint = 170
RTCEAGLVideoView 2 width contraint = 100
RTCEAGLVideoView 2 center is a fixed point at X = 200, Y = 200
Until now everything works fine, the issue is that when I change the following:
RTCEAGLVideoView 1 height constraint = 170
RTCEAGLVideoView 1 width constraint = 100
RTCEAGLVideoView 1 center is a fixed point at X = 200, Y = 200
RTCEAGLVideoView 2 height constraint = UIScreen.current.bounds.height
RTCEAGLVideoView 2 width constraint = UIScreen.current.bounds.width
RTCEAGLVideoView 2 center is UIViewController.view.center
Basically, I replace those 2 RTCEAGLVideoView dimensions and centered position.
The issue is that when I do this, the streaming is distorted and randomly the delegate method (void)videoView: (RTCEAGLVideoView *)videoView didChangeVideoSize: (CGSize)size; is called again and the streaming is fixed. But sometimes this method is not called even if I wait few minutes.
How can I force this reload and the point when I change the dimensions and positions for both RTCEAGLVideoViews.
Small note regarding the configuration:
let options = FPWCSApi2StreamOptions()
let constraints = FPWCSApi2MediaConstraints(audio: true, videoWidth: Int(UIScreen.main.bounds.width), videoHeight: Int(UIScreen.main.bounds.height))
options.constraints = constraints
Last edited: