Hello I have a YouTube struct that loads in YouTube shorts and the videos have a large white background or border around them and I can't get it to go away. I tried applying .tint, .foreground, .background and none work. The only way of changing the size of the white border is by changing the width and height inside the embedded HTML. It seems like the video doesn't fill the whole frame so a white border fills the rest. If anyone knows how I can modify this code to get ride of the white border Id appreciate it. I am also facing an issue where the YouTube play/pause button along with the time bar and all the other video options are very small and don't increase with the size of the video.
import SwiftUIimport WebKitstruct SwiftUIView: View { @Environment(\.colorScheme) var colorScheme var body: some View { VStack{ YouTubeView(link: "-rHELEJuqkU") } }}struct SwiftUIView_Previews: PreviewProvider { static var previews: some View { SwiftUIView() }}struct YouTubeView: UIViewRepresentable { let link: String func makeUIView(context: Context) -> WKWebView { let webConfiguration = WKWebViewConfiguration() webConfiguration.allowsInlineMediaPlayback = true return WKWebView(frame: .zero, configuration: webConfiguration) } func updateUIView(_ uiView: WKWebView, context: Context) { let embedHTML = """<div style="display: flex; justify-content: center; align-items: center; height: 100vh;"><iframe width="500" height="920" src="https://www.youtube.com/embed/\(link)" frameborder="0" allowfullscreen></iframe></div>""" uiView.scrollView.isScrollEnabled = false uiView.loadHTMLString(embedHTML, baseURL: nil) }}