I have an webview that loads videos in it, we would like to be able to fullscreen our videos, so we use the fullscreen preference in the documentation however when it is set to true, upon fullscreening a video then pausing it, the entire video player will disappear.
You can exit fullscreen and attempt to fullscreen the video player once again, however upon doing this the entire app view will now disappear and you'll see your desktop background (or whatever is currently behind your app). This behavior seems consistent across multiple websites with the current app. I have setup a sample project you can test here
The Main error that seems to trigger to the console is this. I have not been able to find a solution to, maybe I am simply missing something here. I am on Sequoia 15.2 for Mac.
Attempting to update all DD element frames, but the bounds or contentsRect are invalid. Bounds: X: 0.00 Y: 0.00, W: 0.00 H: 0.00, contentsRect: X: 0.00 Y: 0.00, W: 1.00 H: 1.00 , skipping
SOLVED: To anybody else that encounters the issue, it seems the way I was setting my constraints was causing the issue. initially from my linked project, I was setting the constraints like so
NSLayoutConstraint.activate([
MainWebView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
MainWebView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
MainWebView.topAnchor.constraint(equalTo: view.topAnchor),
MainWebView.bottomAnchor.constraint(equalTo: view.bottomAnchor)
])
Instead, I just set
MainWebView = WKWebView(frame: view.bounds, configuration: webConfiguration)
as well as MainWebView.translatesAutoresizingMaskIntoConstraints
to true and
MainWebView.autoresizingMask = [.width, .height]
and this seems to work without any errors. I hope this is helpful to someone out there!