While working with a WKWebview that has an embedded YouTube video using their JS SDK, I encountered an issue. My setup includes three different views - internal container, full-screen container, and external (airplay mirroring) container where the WKWebview can be displayed.
I am able to load the video into the WKWebview and move it from internal to full-screen view or airplay view without any problem. The video resizes as expected in these scenarios. However, when trying to move back from full-screen to internal or airplay to internal, the video does not resize 5 out of 6 times.
Interestingly, the same container code works perfectly fine when running the video in a UIWebView. It seems like there is some weird behavior specific to WKWebview in this case.
Has anyone else experienced similar issues?