[Webkit-unassigned] [Bug 191202] sender.replaceTrack() fails with InvalidStateError if the transceiver.direction is "inactive"

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Nov 4 01:01:33 PST 2018


--- Comment #2 from IƱaki Baz <ibc at aliax.net> ---
Created attachment 353801

  --> https://bugs.webkit.org/attachment.cgi?id=353801&action=review

Test script

To test this script, just open Safari 12.1, have "Develop - Experimental Features - WebRTC Unified-Plan" enabled, and paste the script in the Safari console.

In this script the "InvalidStateError" does not happen, probably because there is no full SDP OA (there is no remote SDP). Anyway, it also fails with a 100% related issue:

* The scripts gets two audio tracks and creates a sending transceiver with the first audio track.
* Then it removes it via `pc.removeTrack(micTransceiver.sender);`.
* Then it replaces the previous mic track with the second one:
micTransceiver.direction = 'sendonly'; // <--- IMPORTANT
* However, `pc.createOffer()` generates an SDP offer with `a=inactive`.

This is: once `pc.removeTrack(sender)` is called, the corresponding transceiver becomes 100% unusable for sending a new track. Setting the transceiver.direction = "sendonly" is ignored by Safari (here the bug probably).

NOTE: The script properly works in Chrome and Firefox.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20181104/2b2d60f3/attachment-0001.html>

More information about the webkit-unassigned mailing list