demo ยท v135
RTCEncodedFrame.timestamp
Chrome 135 exposes captureTimestamp and receiveTimestamp on encoded WebRTC frames so insertable streams can measure pipeline latency at frame granularity. The demo wires a loopback RTCPeerConnection, attaches a frame transform, and prints each encoded chunk's metadata.
RTCPeerConnection: ?
RTCRtpScriptTransform: ?
encoded-frame log
the code
const sender = pc.getSenders()[0];
const { readable, writable } = sender.createEncodedStreams();
readable.pipeThrough(new TransformStream({
transform(frame, controller) {
console.log(frame.timestamp, frame.captureTimestamp, frame.metadata());
controller.enqueue(frame);
},
})).pipeTo(writable);
see also
- Encoded Frame Timestamps โ feature index
- ChromeStatus entry