w3c / webrtc-encoded-transform

WebRTC Encoded Transform
https://w3c.github.io/webrtc-encoded-transform/
Other
123 stars 27 forks source link

Should RTCRtpTransceiverInit have sendTransform and receiveTransform members? #221

Open jan-ivar opened 9 months ago

jan-ivar commented 9 months ago

From @alvestrand in https://github.com/w3c/webrtc-encoded-transform/pull/186#issuecomment-1880210215:

Actually addTransceiver() already takes an RTCRtpTransceiverInit with 3 existing members - adding a transform here would be consistent with the existing interface.

This seems reasonable and orthogonal to other discussions, so I'm opening this issue to discuss it. E.g. this:

const transceiver = pc.addTransceiver(track, {
  direction,
  streams,
  sendEncodings,
  sendTransform,
  receiveTransform
});

...would be equivalent to:

const transceiver = pc.addTransceiver(track, {sendEncodings});
transceiver.direction = direction;
transceiver.sender.setStreams(streams);
transceiver.sender.transform = sendTransform;
transceiver.receiver.transform = receiveTransform;