Get to know MDN better
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Note: This feature is only available in Dedicated Web Workers.
Warning: Browsers differ on which global context they expose this interface in (e.g., only window in some browsers and only dedicated worker in others), making them incompatible. Keep this in mind when comparing support.
The MediaStreamTrackProcessor interface of the Insertable Streams for MediaStreamTrack API consumes a video MediaStreamTrack object's source and generates a stream of VideoFrame objects.
Creates a new MediaStreamTrackProcessor object.
window.MediaStreamTrackProcessor()Creates a new MediaStreamTrackProcessor object on the main thread that can process both video and audio.
Returns a ReadableStream.
The following example is from the article Unbundling MediaStreamTrackProcessor and VideoTrackGenerator. It transfers a camera MediaStreamTrack to a worker for processing. The worker creates a pipeline that applies a sepia tone filter to the video frames and mirrors them. The pipeline culminates in a VideoTrackGenerator whose MediaStreamTrack is transferred back and played. The media now flows in real time through the transform off the main thread.
worker.js:
| MediaStreamTrack Insertable Media Processing using Streams # mediastreamtrackprocessor |
Enable JavaScript to view this browser compatibility table.
Note: This article was written before the API was restricted to workers and video. Beware its use of the non-standard version of MediaStreamTrackProcessor which blocks on the main thread.
This page was last modified on May 23, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.