Skip to content

Examples pipe multiple streams into a single writable #15

@jan-ivar

Description

@jan-ivar

The examples won't work as written for more than one sender:

const rtpTransport = pc.createRtpTransport();
pc.getSenders().forEach((sender) => {
  pc.createEncodedStreams().readable.
      pipeThrough(createPacketizingTransformer()).pipeTo(rtpTransport.writable);
});

...because multiple streams cannot be piped into a single writable.

It's not super-clear what a single "transport" is meant to be scoped to.

  1. Is there one for the entire peer connection?
  2. Is there one per transceiver?
  3. Is there one per sender and receiver?
  4. Is there one per transform?
  5. Can apps create as many as they wish?

Is it just a packetizer sink? — In #14 I end up with number 4.

Conceptually, is this just be some option on a transform to change expected inputs and outputs? E.g. on the sender:

  1. encodedFrame → encodedFrame (default, e.g. e2ee)
  2. encodedFrame → packet (e.g adding metadata)
  3. Frame → encodedFrame (JS encoder)
  4. Frame → packet (hold my beer)

If so, this proposal may be closer to @alvestrand's than I previously appreciated.

Metadata

Metadata

Assignees

Labels

PR ExistsA PR has been submitted

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions