Bug 260787

Summary: REGRESSION (Safari 17 beta): Cannot recover video play once set srcObject to null
Product: WebKit Reporter: simu <seimor>
Component: WebRTCAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: ap, eric.carlson, jer.noble, youennf
Priority: P2    
Version: Safari 17   
Hardware: Mac (Intel)   
OS: Unspecified   

Description simu 2023-08-28 03:10:32 PDT
At safari 17, I encounter a problem:

When I capture video-stream from local camera, and set it to video's srcObject

The video play normally

Then I set srcObject to null and then set stream back

The video will not play.

----------------------------------------------

You can reproduce it at webrtc sample website.

1. Open : https://webrtc.github.io/samples/src/content/getusermedia/gum/
2. Click open camera button
3. Open dev-tools
4. Run code: const video = document.querySelector('video')
5. Run code: video.srcObject = null
6. Run code: video.srcObject = stream

Finally, The video will not play even if you call video.play(). But it is fine at safari older version(such as safari 16)

Thanks.
Comment 1 simu 2023-08-28 03:11:56 PDT
If you update video's css attribute like height, the video will play again.
Comment 2 youenn fablet 2023-08-29 00:19:20 PDT
This should be fixed now in trunk and iOS seeds.

*** This bug has been marked as a duplicate of bug 258723 ***
Comment 3 Alexey Proskuryakov 2023-08-29 08:05:39 PDT
Bug 258723 was fixed in developer beta 4 released on 7/31/2023. Please let us know if this is still happening.