Files
VibeCoding/webrtc_controller_ios/web_rtc_controller_ios/Views/RemoteVideoView.swift

16 lines
506 B
Swift
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import SwiftUI
import WebRTC
/// SwiftUI WebRTC Metal UIKit
/// ViewModel attach SwiftUI
struct RemoteVideoView: UIViewRepresentable {
let videoView: RTCMTLVideoView
func makeUIView(context: Context) -> RTCMTLVideoView {
videoView.videoContentMode = .scaleAspectFit
return videoView
}
func updateUIView(_ uiView: RTCMTLVideoView, context: Context) {}
}