Bug 172761 - Crash on resetting video.srcObject after replaceTrack
Summary: Crash on resetting video.srcObject after replaceTrack
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-05-31 11:09 PDT by Andrew Morris
Modified: 2017-06-13 19:15 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.