Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling removeTrack twice shouldn't throws an InvalidAccessError #154

Open
syerrapragada opened this issue Aug 23, 2018 · 1 comment
Open

Comments

@syerrapragada
Copy link
Contributor

see: https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/removeTrack

If the track is already stopped, or is not in the connection's senders list, this method has no effect.

But the shim implementation throws InvalidAccessError if removeTrack is called twice.

@fippo
Copy link
Member

fippo commented Aug 24, 2018

This is partly due to not implementing the transceiver model. See https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnection-removetrack

The error is consistent with Chrome (I think) when you try to do this:

const pc = new RTCPeerConnection();
pc.addStream(somelocalstream);
const sender = pc.getSenders()[0];
pc.removeTrack(sender);
pc.removeTrack(sender);

which throws the same error. Definetly something to fix but the transceiver model is a big chunk of work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants