diff --git a/webrtc_controller_ios/web_rtc_controller_ios/Views/ContentView.swift b/webrtc_controller_ios/web_rtc_controller_ios/Views/ContentView.swift index 7037de0..cbf6972 100644 --- a/webrtc_controller_ios/web_rtc_controller_ios/Views/ContentView.swift +++ b/webrtc_controller_ios/web_rtc_controller_ios/Views/ContentView.swift @@ -279,7 +279,6 @@ private struct ControlPanelView: View { viewModel.sendSwipe(x1: x1, y1: y1, x2: x2, y2: y2, duration: duration) }) } - .aspectRatio(viewModel.videoAspect, contentMode: .fill) .frame(maxWidth: .infinity, maxHeight: .infinity) // 录制中指示(左上角红点) diff --git a/webrtc_controller_ios/web_rtc_controller_ios/Views/SelfCodecDisplayView.swift b/webrtc_controller_ios/web_rtc_controller_ios/Views/SelfCodecDisplayView.swift index 8acfdfc..0bf7443 100644 --- a/webrtc_controller_ios/web_rtc_controller_ios/Views/SelfCodecDisplayView.swift +++ b/webrtc_controller_ios/web_rtc_controller_ios/Views/SelfCodecDisplayView.swift @@ -16,13 +16,13 @@ final class SampleBufferDisplayView: UIView { override init(frame: CGRect) { super.init(frame: frame) - sampleBufferLayer.videoGravity = .resizeAspect + sampleBufferLayer.videoGravity = .resizeAspectFill backgroundColor = .black } required init?(coder: NSCoder) { super.init(coder: coder) - sampleBufferLayer.videoGravity = .resizeAspect + sampleBufferLayer.videoGravity = .resizeAspectFill backgroundColor = .black } }