Sadly I have not found the exact cause of this. However, here’s an as accurate picture as I can give: - Browse 9gag.com, video works correctly - Do some other stuff on your computer (let the browser rest for a bit, but leave it open) - Go back to 9gag.com - Repeat until, at some point, videos stop working. A simple dev workflow… When the videos do not work, they do not work for any website in Safari. If I try to load an example video (like https://frostland.fr/frizlab/piano1.mp4), which should work directly, I get the following error in the console: “Failed to load resource: Plug-in handled load”. I have tried reloading after disabling all the extensions, I get the same message in the log and the video still does not work. The only reliable workaround I found to have the video working again is relaunching Safari. However, sometimes, the videos just work again out of the blue! I have confirmed this problem with Safari “16.1 (18614.2.9.1.12),” STP “156 (Safari 16.4, WebKit 18615.1.8.5)” (maybe not this exact version for STP, but close) and Orion “0.99.121-beta (WebKit 614.1.20).”
<rdar://problem/101514971>
From your description, it's possible that the com.apple.WebKit.GPU process is hung. No additional media rendering would be possible in that case, and the "solution" of restarting the browser would kill and restart the GPU process as well. When you're in this mode, running `sample com.apple.WebKit.GPU` or using Activity Monitor's "Sample Process" menu item to collect a sample and attaching it to this bug report would be very helpful.
Created attachment 463412 [details] Sample of com.apple.WebKit.GPU while the video do not work
I have attached a sample of com.apple.WebKit.GPU taken while the video failed to load. After taking the sample I killed com.apple.WebKit.GPU to verify it was the faulty process, and indeed, after it restarted, the videos started working again.
Thanks for the sample; it does help shed light on what's going on. It appears a number of low-level media framework threads are deadlocked. I've asked the relevant teams here at Apple to take a look.
This is actually being tracked by: <rdar://77347577>
The cause of this bug is outside of the WebKit code base, so resolving as MOVED. Investigation by the relevant team is proceeding under <rdar://77347577>.