demo · v130
Frame Metadata Editor
Chrome 130 allows RTCEncodedVideoFrame.setMetadata() and RTCEncodedAudioFrame.setMetadata() to modify frame metadata inside an encoded transform. Adjust the RTP timestamp offset, contributing source list, payload type, and spatial/temporal layer indices below. The before/after panels show exactly which fields changed — the same view your transform sees at pipeline time.
Checking RTCEncodedVideoFrame.setMetadata support…
Simulated frame stream — click a frame to select it:
Before — original metadata
After — setMetadata() applied
Metadata overrides
Select a frame above then click "Apply setMetadata()".
// Chrome 130: setMetadata() in an RTCEncodedTransform
const transform = new TransformStream({
transform(frame, controller) {
const meta = frame.getMetadata();
// Shift timestamp for lip-sync adjustment (+1 second @ 90kHz)
frame.setMetadata({
...meta,
rtpTimestamp: meta.rtpTimestamp + 90000,
// Modify contributing sources for mixer use
contributingSources: [12345678, 87654321],
// Override spatial/temporal layer for SVC
spatialIndex: 0,
temporalIndex: 0,
// Change codec payload type
payloadType: 96,
});
controller.enqueue(frame);
}
});