RTCRtpReceiver: transform property

Baseline 2025
Newly available

Since October 2025, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

The transform property of the RTCRtpReceiver object is used to insert a transform stream (TransformStream) running in a worker thread into the receiver pipeline. This allows stream transforms to be applied to encoded video and audio frames as they arrive from the packetizer (before they are played/rendered).

The transform that is to be added is defined using an RTCRtpScriptTransform and its associated Worker. If the transform is set in the peer connection track event handler, the transform stream will receive the first full incoming frame for the track.

Value

A RTCRtpScriptTransform, or null if the receiver has no associated transform stream.

Example

Note that this is part of a larger example in the guide topic Using WebRTC Encoded Transforms.

Adding a transform for incoming frames

This example shows how you add a WebRTC encoded transform to modify an incoming stream. The code assumes that there is an RTCPeerConnection called peerConnection that is already connected to a remote peer.

To add a transform stream into the pipeline for incoming frames we need to construct an RTCRtpScriptTransform and assign it to the receiver's transform property. We can do this in the track event handler as shown. This event is fired on the peer connection whenever the remote end sends a track. The event.receiver property is an RTCRtpReceiver.

js
const worker = new Worker("worker.js");
peerConnection.ontrack = (event) => {
  event.receiver.transform = new RTCRtpScriptTransform(worker, {
    someOption: "receiverTransform",
  });
};

Because the transform is constructed immediately after creation of the RTCRtpReceiver, it will receive the first incoming frame. The object passed as the second parameter in the RTCRtpScriptTransform constructor is sent to the worker thread, and can be used by worker code to provide a different transform for the incoming frames than is used for outgoing frames.

Specifications

Specification
WebRTC Encoded Transform
# dom-rtcrtpsender-transform

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
transform
Chrome – Full support
Chrome 141 (Release date: 2025-09-30)
footnote Full support
Edge – Full support
Edge 141 (Release date: 2025-10-03)
footnote Full support
Firefox – Full support
Firefox 117 (Release date: 2023-08-29)
footnote Full support
Opera – Full support
Opera 125 (Release date: 2025-12-04)
footnote Full support
Safari – Full support
Safari 15.4 (Release date: 2022-03-14)
footnote Full support
Chrome Android – Full support
Chrome Android 141 (Release date: 2025-09-30)
footnote Full support
Firefox for Android – Full support
Firefox for Android 117 (Release date: 2023-08-29)
footnote Full support
Opera Android – Full support
Opera Android 93 (Release date: 2025-11-25)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15.4 (Release date: 2022-03-14)
footnote Full support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – Full support
WebView Android 141 (Release date: 2025-09-30)
footnote Full support
WebView on iOS – Full support
WebView on iOS 15.4 (Release date: 2022-03-14)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support

See also