Intent to Extend Experiment: MediaStreamTrack Insertable Streams (a.k.a. Breakout Box)

Skip to first unread message

Tony Price

Jun 16, 2021, 10:29:47 AM6/16/21

Contact emails,,



API spec


Design docs


This feature defines an API surface for manipulating raw media carried by MediaStreamTracks such as the output of a camera, microphone, screen capture, or the decoder part of a codec and the input to the decoder part of a codec. It uses WebCodecs interfaces to represent raw media frames and exposes them using streams, similarly to the way the WebRTC Insertable Streams spec exposes encoded data from RTCPeerConnections.

Blink component


TAG review

TAG review status

Positive initial response. Pending approval.


Interoperability and Compatibility

As with all new features, the main interoperability risk is that other browsers do not implement it. There is no compatibility risk since the existing behavior is unaffected if the feature is not used.

Gecko: Negative. Their main objections are audio support and allowing processing on the Window scope. See:

WebKit: Negative. They object to using the streams API, supporting audio and allowing processing on the Window scope. See:

Web developers: Positive so far, but more feedback being collected.


* Are there any other platform APIs this feature will frequently be used in tandem with?

This API will be used together with other MediaStream and WebRTC related APIs, such as getUserMedia, getDisplayMedia, and RTCPeerConnection.

* Could the default usage of this API make it hard for Chrome to maintain good performance (i.e. synchronous return, must run on a certain thread, guaranteed return timing)? 



* Will it be challenging for developers to take advantage of this feature immediately, as-is? 


* Would this feature benefit from having polyfills, significant documentation and outreach, and/or libraries built on top of it to make it easier to use?



This feature introduces a new MediaStreamTrack sink and source.

The sink (MediaStreamTrackProcessor) exposes data that is already exposed in Chrome by other sinks (e.g., media elements, Web Audio, peer connection. In this sense, it does not introduce new attack surfaces other than the API implementation itself. Security relies on existing security mechanisms for MediaStreamTrack sources. For example, all camera or screen-capture tracks require user authorization and element capture does not allow access to cross-origin data.

The source (MediaStreamTrackGenerator) allows users to create new tracks using data already available to the Web page. In this case, security relies on the same-origin policy, as the document can only create media frames using data that is already visible.

All the code for this feature runs in the sandboxed renderer process and therefore respects the Rule of Two.

Goals for experimentation

We are looking for feedback with regards to the API shape and its performance, especially for the video processing use case. We also want to learn if the WebCodecs interfaces for raw data need adjustment to better support the use cases enabled by this API.

Since this API can be seen as an extension to WebCodecs, we are reusing the WebCodecs Origin Trial token in order to make it easier for existing participants in the WebCodecs trial to use this API.

Reason this experiment is being extended

This feature depends on WebCodecs,, which itself has had experimentation extended (see the WebCodecs Intent To Extend Origin Trial). The trial extension will also provide more time to improve our implementation and seek cross UA consensus. This feature is already controlled by the WebCodecs origin trial. 

Experimental timeline

This experiment is controlled by the WebCodecs origin trial. It started on M90, and was initially expected to conclude with the release of M92 stable. We are now requesting to continue to use the WebCodecs trial for the additional 2 milestones (M93 and M94) for which that trial will run, concluding with the release of M94 stable. 

Ongoing technical constraints


Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?


Is this feature fully tested by web-platform-tests?

There are WPT tests covering the core of this feature and additional tests are planned. Existing tests can be found at:

Flag name


Tracking bug

Launch bug

Link to entry on the Chrome Platform Status

Links to previous Intent discussions

Intent to prototype:!topic/blink-dev/gkBkLvGKuzc

Intent to Experiment:

This intent message was generated by Chrome Platform Status.

Thomas Steiner

Jun 16, 2021, 11:35:58 AM6/16/21
to Tony Price, blink-dev
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Thomas Steiner, PhD—Developer Advocate (,

Google Germany GmbH, ABC-Str. 19, 20354 Hamburg, Germany
Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
Registergericht und -nummer: Hamburg, HRB 86891

Version: GnuPG v2.1.23 (GNU/Linux)


Yoav Weiss

Jun 17, 2021, 12:53:20 AM6/17/21
to Thomas Steiner, Tony Price, blink-dev
This is concerning. It seems like both Mozilla and Apple are engaged yet object to some aspects of the current design. How likely are we to reach consensus here?
Do we have concrete users and concrete examples for the contention points? (Window scope, audio processing, etc)

Web developers: Positive so far, but more feedback being collected.

Any signals from current OT participants?

Guido Urdaneta

Jun 17, 2021, 7:39:00 AM6/17/21
to Yoav Weiss, Thomas Steiner, Tony Price, blink-dev
I believe consensus is unlikely.

Do we have concrete users and concrete examples for the contention points? (Window scope, audio processing, etc)
Yes, we do.
At least one OT participant has expressed that supporting the Window scope is important for them. This use case is not a large-scale VC service, but a production application for evaluating video effects together with WebCodecs. In this use case, simplicity is very important and Workers bring no benefit whatsoever, but instead add complexity, according to the participant. They note that there is some friction to using workers together with TypeScript and Webpack.  
Another important use case is migration of existing large codebases using video element+canvas capture. In this case, introducing a worker into the architecture can be quite disruptive, so a migration in multiple stages where processing is migrated first on the Window scope and then moved to a worker is a sensible approach.
For audio, we are aware of a participant who benefits from using the same API for audio and video to do similar processing to both in the context of a gaming application. Also, any processing that involves video together with audio (e.g., audio-visual speech separation, see benefits from audio support in this API.
We're willing to make Window-scope usage opt-in and disabled by default (e.g., require an explicit parameter in the constructor to allow it), but we are not willing to forbid it entirely or to produce a more complex API just to make it exceedingly difficult.


Web developers: Positive so far, but more feedback being collected.

Any signals from current OT participants?
I mentioned some preliminary feedback we have received. We are in the process of requesting more specific feedback from OT participants with regards to the issues Apple and Mozilla oppose (use of streams, audio support and window scope).


Guido Urdaneta

Jul 22, 2021, 1:00:52 PM7/22/21
to Guido Urdaneta, Yoav Weiss, Thomas Steiner, Tony Price, blink-dev
Updating this thread to request extending the experiment.
There is an Intent to Ship this feature that addressed the questions originally raised here.
Final approval to ship awaits a W3C Media WG decision about Window exposure of WebCodecs interfaces. This decision will not be made before M94, so requesting to extend the experiment for two more releases (M93 and M94). 

Chris Harrelson

Jul 22, 2021, 3:05:27 PM7/22/21
to Guido Urdaneta, Yoav Weiss, Thomas Steiner, Tony Price, blink-dev
Reply all
Reply to author
0 new messages