Bug 172761

Summary: Crash on resetting video.srcObject after replaceTrack
Product: WebKit Reporter: Andrew Morris <andrew>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: eric.carlson, jonlee, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   

Description Andrew Morris 2017-05-31 11:09:05 PDT
When using .replaceTrack on the RtcRtpSender, to update the local video I also used .removeTrack and .addTrack on the local stream. In Firefox I found it was sometimes necessary to do `video.srcObject = video.srcObject;` to make it display the new video properly. When I ran the same code on WebKit, it crashed.

(Note: It does work fine for me without resetting the srcObject in WebKit though.)

I created this jsbin based on the basic RTCPeerConnection webrtc sample to demonstrate the issue:

https://output.jsbin.com/qewizecate

(Click 'Start', 'Call', check 'Refresh srcObject', click 'Change Video'.)
Comment 1 Andrew Morris 2017-05-31 15:01:22 PDT
Ah the jsbin expired, here's one that should last: https://output.jsbin.com/doweto
Comment 2 Radar WebKit Bug Importer 2017-05-31 15:07:45 PDT
<rdar://problem/32496861>
Comment 3 Jon Lee 2017-06-13 19:15:54 PDT
I cannot reproduce this on STP 32.