Intent to ship RTCRtpScriptTransform

199 views
Skip to first unread message

Jan-Ivar Bruaroey

unread,
Jul 26, 2023, 4:41:57 PM7/26/23
to dev-pl...@mozilla.org
We intend to ship the RTCRtpScriptTransform API in Firefox 117 (already in Nightly).


Summary: The RTCRtpScriptTransform API allows websites to plug JavaScript workers into WebRTC’s realtime media pipeline, to transform the encodings being sent and received over an RTCPeerConnection.

Its primary purpose is to let websites implement their own encryption to protect end-users’ audio and video from any middle-boxes the website may employ (but not from the website itself).

Some refer to this as “end-to-end-encryption”, even though it doesn’t satisfy the Wikipedia definition of E2EE https://en.wikipedia.org/wiki/End-to-end_encryption, because it doesn’t protect against the “communication system provider”.

Long-term, Mozilla would prefer an even stronger E2EE API where keying material is not shared with JavaScript. We look forward to progress in the IETF on this, and the SFrameTransform API in the same spec, which aims for this. In the meantime, we recognize the incremental privacy value of the RTCRtpScriptTransform API for services that exist today.

Bug: https://bugzil.la/1631263

Standard: https://www.w3.org/TR/webrtc-encoded-transform/#scriptTransform

Platform Coverage: Available on all platforms.

Preference: This API is available by default, but can be turned off by setting media.peerconnection.scripttransform.enabled to false.

Other Browsers:

Implemented in Safari. Chrome implements an earlier incompatible version of the API that is no longer standards-track. The main difference is the standard API is a worker-first API.

Demo: The WebRTC Samples page works with both APIs. If you’re reading this shortly after it was posted, please use the second link to use the latest version that works with Firefox 117:

  1. https://webrtc.github.io/samples/src/content/insertable-streams/endtoend-encryption/

  2. https://jan-ivar.github.io/samples/src/content/insertable-streams/endtoend-encryption/ (contains a minor feature-detection fix to work with Firefox)

It should be possible to simplify a future version of WebRTC Samples with a shim in adapter.js.

Web-platform-tests: https://wpt.fyi/results/webrtc-encoded-transform
Reply all
Reply to author
Forward
0 new messages