Created attachment 418093 [details] Minimal bug example with instructions When a WebGL texture is being updated with frames from a playing video element through calls to `gl.texImage2d()`, a sequence of operations will cause these texture updates to begin silently failing. The sequence of operations is: - pause video - defocus Safari - focus Safari - play video - pause video - play video I have reproduced the issue with a minimal html/js file and public domain video, which I've attached in a zip archive. #### Instructions 1. Open html file in Safari and let video start playing. 2. Click 'pause' button. 3. Switch focus to another window or go to a different MacOS workspace. 4. Return focus to the Safari window. 5. Click 'play' button. 6. Click 'pause' button. 7. Click 'play' button. - Expectation: The video texture continues to be updated as the video plays once again from the beginning. - Reality: The video plays, with the video's audio audible, but the texture doesn't get updated even though `gl.texImage2d()` is being called.
For me, the video was frozen after step 5, but started playing after step 7.
The iosurface stops updating. Based on brief debugging, maybe this: pause + setvisible(false) causes MediaPlayerPrivateAVFoundation get confused and it destroys the video layer. setvisible(true) then should call platformSetVisible but the video layer is nil.
<rdar://problem/73687225>