[Webkit-unassigned] [Bug 191202] New: sender.replaceTrack() fails with InvalidStateError if the transceiver.direction is "inactive"
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Nov 2 11:48:59 PDT 2018
https://bugs.webkit.org/show_bug.cgi?id=191202
Bug ID: 191202
Summary: sender.replaceTrack() fails with InvalidStateError if
the transceiver.direction is "inactive"
Product: WebKit
Version: Safari Technology Preview
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WebRTC
Assignee: webkit-unassigned at lists.webkit.org
Reporter: ibc at aliax.net
CC: youennf at gmail.com
Scenario:
* A peerconnection with a sending track (no receiving tracks).
transceiver = pc.addTransceiver(track, { direction: 'sendonly' });
* Later I remove the track:
pc.removeTrack(transceiver.sender);
* When calling pc.createOffer() it generates a m= section with a=inactive (it was a=sendonly before, so it makes sense). The remote SDP answer has also a=inactive as per spec (but it does NOT have port=0 in the m line).
* Later I want to reuse the same transceiver (which is NOT stopped, this is: transceiver.stopped is false) for sending a new track:
const promise = transceiver.sender.replaceTrack(newTrack);
* However, promise is rejected with "InvalidStateError: The object is in an invalid state." which IMHO doesnot make any sense. What does "invalid state" mean for a RtpSender? Yes, `pc.removeTrack(transceiver.sender)` was called before this, but it should not mean that the transceiver becomes unusable for sending new media. It's not stopped, it's just inactive. I should be able to set a new sending track.
NOTE: This works fine in Chrome 72.
--
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/20181102/3db247ce/attachment.html>
More information about the webkit-unassigned
mailing list