Bug 191261 - Calling sender.replaceTrack() twice produces a new transceiver and its corresponding m= section
Summary: Calling sender.replaceTrack() twice produces a new transceiver and its corres...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Major
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-11-05 06:59 PST by Iñaki Baz
Modified: 2018-11-06 19:43 PST (History)
4 users (show)

See Also:


Attachments
Script that reproduces the issue. Just run it in Safari 12.1 console with "Unified-Plan" enabled. (2.94 KB, text/javascript)
2018-11-05 06:59 PST, Iñaki Baz
no flags Details
Patch (13.37 KB, patch)
2018-11-06 01:45 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (13.43 KB, patch)
2018-11-06 18:17 PST, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Iñaki Baz 2018-11-05 06:59:49 PST
Created attachment 353860 [details]
Script that reproduces the issue. Just run it in Safari 12.1 console with "Unified-Plan" enabled.

Scenario:

* Have a pc with an audio transceiver for just sending.

* Do transceiver.sender.replaceTrack(null) and renegotiate.

* Do transceiver.sender.replaceTrack(track) and renegotiate.

After that, we have two audio transceivers so two m=audio sections. Of course this should not happen. It works fine in Chrome and Firefox.

Script attached.
Comment 1 youenn fablet 2018-11-05 19:46:21 PST
This is a left over of plan B/unified plan migration.
Will fix it
Comment 2 youenn fablet 2018-11-06 01:45:31 PST
Created attachment 353952 [details]
Patch
Comment 3 Eric Carlson 2018-11-06 07:19:10 PST
Comment on attachment 353952 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=353952&action=review

> Source/WebCore/ChangeLog:11
> +        Covered by updated test.

Nit: you should mention that you updated webrtc/video-addTransceiver.html to test this.
Comment 4 youenn fablet 2018-11-06 18:17:50 PST
Created attachment 354040 [details]
Patch for landing
Comment 5 WebKit Commit Bot 2018-11-06 19:24:07 PST
Comment on attachment 354040 [details]
Patch for landing

Clearing flags on attachment: 354040

Committed r237910: <https://trac.webkit.org/changeset/237910>
Comment 6 WebKit Commit Bot 2018-11-06 19:24:08 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2018-11-06 19:25:26 PST
<rdar://problem/45864192>
Comment 8 youenn fablet 2018-11-06 19:43:46 PST
(In reply to Eric Carlson from comment #3)
> Comment on attachment 353952 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=353952&action=review
> 
> > Source/WebCore/ChangeLog:11
> > +        Covered by updated test.
> 
> Nit: you should mention that you updated webrtc/video-addTransceiver.html to
> test this.

Thanks for the review.
Done!