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

Spec doesn’t say what happens on reuse #209

Open
jan-ivar opened this issue Oct 16, 2023 · 0 comments
Open

Spec doesn’t say what happens on reuse #209

jan-ivar opened this issue Oct 16, 2023 · 0 comments

Comments

@jan-ivar
Copy link
Member

What should happen if a transform is reused? E.g.

const pc = new RTCPeerConnection();
const senderA = pc.addTransceiver("audio");
const senderB = pc.addTransceiver("video");
const transform = new RTCRtpScriptTransform(worker, {});
senderA.transform = senderB.transform = transform;

The spec says RTCRtpScriptTransform and RTCRtpScriptTransformer are 1←→1, so they can’t be reused without single-filing A and B processing through the single pipe, which seems undesirable.

Offline feedback from @youennf suggests single-use was intended?

That said, it might be useful to switch between transforms on the same sender, or turning transformation on/off e.g.

tickmark.onclick = () => { senderA.transform = tickmark.checked? transform : null; }

I propose we throw if a transform was ever assigned to a different sender or receiver.

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

1 participant