Skip to content

SFrameTransform interface has two heads #262

@jan-ivar

Description

@jan-ivar

The SFrameTransform interface appears to have been designed with two disparate uses in mind:

  1. in place of a RTCRtpScriptTransform:
    transceiver.sender.transform = new SFrameTransform;
  2. as a builtin TransformStream:
    onrtctransform = async ({transformer: {readable, writable}}) => {
      await readable.pipeThrough(new SFrameTransform({role: "encrypt"})).pipeTo(writable);
    };

These are entirely different uses that arguably should be two different interfaces.

For instance, web developers shouldn't have to figure out what this means:

await readable.pipeThrough(transceiver.sender.transform).pipeTo(writable); // what does this do?

A RTCRtpScriptTransform, in contrast, has no stream-like properties on main-thread.

Unfortunately, the current spec conflates two "transform" concepts, making this hard to see. But #229 should clear this up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions