I want to rotate the screen of the remote video 90 degrees. Is there any way to rotate in the client?
I know the keyword RTCVideoRotation. But I'm not sure where to apply it.
This is my VideoView to rendering.
struct VideoView: UIViewRepresentable {
let videoTrack: RTCVideoTrack?
@Binding var refreshVideoTrack: Bool
func makeUIView(context: Context) -> RTCEAGLVideoView {
let view = RTCEAGLVideoView(frame: .zero)
view.contentMode = .scaleAspectFill
return view
}
func updateUIView(_ view: RTCEAGLVideoView, context: Context) {
if(refreshVideoTrack){
videoTrack?.add(view)
refreshVideoTrack = false
}
}
}