[webrtc-encoded-transform] Spec doesn’t say what happens on reuse (#209)

jan-ivar has just created a new issue for https://github.com/w3c/webrtc-encoded-transform:

== Spec doesn’t say what happens on reuse ==
What should happen if a transform is reused? E.g.

```js
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.
```js
tickmark.onclick = () => { senderA.transform = tickmark.checked? transform : null; }
```
I propose we throw if a transform was ever assigned to a different sender or receiver.


Please view or discuss this issue at https://github.com/w3c/webrtc-encoded-transform/issues/209 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 16 October 2023 19:07:04 UTC