- From: Harald Alvestrand <harald@alvestrand.no>
- Date: Tue, 29 May 2018 08:31:05 +0200
- To: "public-webrtc@w3.org" <public-webrtc@w3.org>
- Message-ID: <746dd2fe-7c63-b9bd-0d41-0e8e982b420b@alvestrand.no>
** *Low-level RtpTransport* * One alternative to extending the RTPSender interface is to define a new RTPTransport interface that takes RTP packets as its input/output format. This would allow applications that desire to do so to implement the entire RTP stack (or a tweaked RTP stack) in Javascript or WebAssembly. Note: before deciding this level, we have to decide whether congestion control and encryption lives above or below the interface. If we do an API that does encryption in user space, we also expose keys to Javascript, which is not always a Good Thing. The transport has to police the congestion control, so the interface has to take congestion control signals from the transport and take appropriate action in choosing to send or not to send. This (API for congestion control) is said to be an advantage of the Streams API, so this should at least be looked at. An example interface: // A DtlsTransport and/or IceTransport underneath // This is encrypted and congestion-controlled interface RtpTransport { sendRtpPacket(RtpPacket packet); sendRtcpPacket(RtcpPacket packet); attribute eventhandler onrtppacket; attribute eventhandler onrtcppacket; } dictionary RtpPacket { // Metadata/"control block" unsigned octet payloadType; unsigned int sequenceNumber; unsigned long ssrc; array<RtpHeaderExtension> header_extensions; array<unsigned long> csrcs; bytes payload; } dictionary RtpHeaderExtension { unsigned int id; bytes value; } dictionary RtcpPacket { // ... } A streams interface: Interface RtpTransport { ReadableStream<RtpPacket, RtcpPacket> reader; WritableStream<RtpPacket, RtcpPacket> writer; } (note: Syntax for defining acceptable types for a stream invented by hta) * -- Surveillance is pervasive. Go Dark.
Received on Tuesday, 29 May 2018 06:31:30 UTC