Difficulty playing videos from WKWebView

I am running into a weird bug where videos embedded in WKWebViews do not appear. I get audio, but the screen goes black. A few notes:

  • This happens on iOS 15 and the 15.1 beta, but not iOS 14.8.
  • I have three WKWebViews in the view hierarchy. If I reduce the number of WebViews to one, I do not encounter this issue. When I encounter this issue with one WebView, playing the same video from another WebView will work.
  • It seems to happen more often when in dark mode than in light mode.

This might be an Apple bug, but I have not been successful in building a standalone app that can reproduce this.I know this isn’t a lot to go on, but if anyone has pointers or can suggest something to try I would appreciate it.

Thanks.

John

strange, we are having the opposite problem, videos not playing in wkwebview on ios14.8 but working properly in ios15

I tracked my issue down to CSS opacity values that were below 1.0 (but much higher than 0.0. I reported this as FB9652283. It sounds like the issue you are encountering is different, though.

Difficulty playing videos from WKWebView
 
 
Q