RESOLVED FIXED 184911
RTCRtpSender.replaceTrack(null) ends current track
https://bugs.webkit.org/show_bug.cgi?id=184911
Summary RTCRtpSender.replaceTrack(null) ends current track
seppe
Reported 2018-04-24 02:47:18 PDT
According to the spec, adding and then removing a track from a RTCPeerConnection can be done as follows: let pc = new RTCPeerConnection(); let sender = pc.addTrack(track, stream); // Negotiate,... sender.replaceTrack(null); This works fine on Chrome and Firefox. On Safari however, the call to replaceTrack() stops the track entirely, setting readyState to "ended" (but interestingly, not calling the onended callback). This makes it impossible to use this method to remove a track that is still used elsewhere. This is problematic, especially since pc.removeTrack(track) is buggy as well: https://bugs.webkit.org/show_bug.cgi?id=174327 This example should demonstrate the issue: https://jsfiddle.net/vt55wx9u/4/.
Attachments
Patch (13.98 KB, patch)
2018-06-18 02:28 PDT, youenn fablet
no flags
Archive of layout-test-results from ews106 for mac-sierra-wk2 (2.79 MB, application/zip)
2018-06-18 03:41 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews124 for ios-simulator-wk2 (2.24 MB, application/zip)
2018-06-18 04:14 PDT, EWS Watchlist
no flags
Patch (17.44 KB, patch)
2018-06-18 05:56 PDT, youenn fablet
no flags
Archive of layout-test-results from ltilve-gtk-wk2-ews for gtk-wk2 (2.84 MB, application/zip)
2018-06-18 18:14 PDT, Igalia-pontevedra EWS
no flags
Radar WebKit Bug Importer
Comment 1 2018-06-03 15:09:44 PDT
youenn fablet
Comment 2 2018-06-18 02:28:53 PDT
EWS Watchlist
Comment 3 2018-06-18 03:41:30 PDT
Comment on attachment 342919 [details] Patch Attachment 342919 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/8229141 New failing tests: imported/w3c/web-platform-tests/webrtc/RTCRtpSender-replaceTrack.html
EWS Watchlist
Comment 4 2018-06-18 03:41:32 PDT
Created attachment 342920 [details] Archive of layout-test-results from ews106 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
EWS Watchlist
Comment 5 2018-06-18 04:14:10 PDT
Comment on attachment 342919 [details] Patch Attachment 342919 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/8229193 New failing tests: imported/w3c/web-platform-tests/webrtc/RTCRtpSender-replaceTrack.html
EWS Watchlist
Comment 6 2018-06-18 04:14:11 PDT
Created attachment 342923 [details] Archive of layout-test-results from ews124 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews124 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.4
youenn fablet
Comment 7 2018-06-18 05:56:48 PDT
Igalia-pontevedra EWS
Comment 8 2018-06-18 18:14:27 PDT
Comment on attachment 342927 [details] Patch Attachment 342927 [details] did not pass gtk-wk2-ews (gtk-wk2): Output: http://webkit-queues.webkit.org/results/8238825 New failing tests: http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-under-top-frame-origins.html
Igalia-pontevedra EWS
Comment 9 2018-06-18 18:14:31 PDT
Created attachment 342999 [details] Archive of layout-test-results from ltilve-gtk-wk2-ews for gtk-wk2 The attached test failures were seen while running run-webkit-tests on the gtk-wk2-ews. Bot: ltilve-gtk-wk2-ews Port: gtk-wk2 Platform: Linux-4.16.0-0.bpo.1-amd64-x86_64-with-debian-9.4
youenn fablet
Comment 10 2018-06-18 23:54:12 PDT
Comment on attachment 342927 [details] Patch gtk error is unrelated
WebKit Commit Bot
Comment 11 2018-06-19 00:20:57 PDT
Comment on attachment 342927 [details] Patch Clearing flags on attachment: 342927 Committed r232956: <https://trac.webkit.org/changeset/232956>
WebKit Commit Bot
Comment 12 2018-06-19 00:20:59 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.