I have a problem with integrating Audio and Video from WebRTC to SwiftUI View. Im trying to do this with UIViewRepresentable, but catch an error. About audio streaming i have no idea. My SwiftUI View:
if showingVideo {
//MARK: SHOW VIDEO, AND TURN ON AUDIO
} else {
}
My try with using UIViewRepresentable
func makeUIView(context: Context) -> RTCEAGLVideoView {
self.remoteView.frame = CGRect(x: 20, y: 20, width: 200, height: 300)
self.remoteView = self.video.remoteVideoView!
return self.remoteView
}