javascriptwebrtcrtp

How to get access to WebRTC RTP packet sequence number


In WebRTC, each RTP packet will have a sequence number in the header. (See here: https://www.geeksforgeeks.org/real-time-transport-protocol-rtp/ )

But is there a way to access this raw sequence number from the web? I've been looking into transform streams and videoframes but haven't seen an interface that exposes it.


Solution

  • There's no way to access raw RTP packets in browser. Packetization, jitter buffer, congestion control and other low-level streaming protocol features are hidden in WebRTC implementation.

    There are ways to access individual video frames though if you interested in modifying them. See insertable streams (for decoded frames) or RTCRtpScriptTransform (for encoded frames).