Get to know MDN better
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Non-standard: This feature is not standardized. We do not recommend using non-standard features in production, as they have limited browser support, and may change or be removed. However, they can be a suitable alternative in specific cases where no standard option exists.
Note: Consider using VideoTrackGenerator instead.
The MediaStreamTrackGenerator interface of the Insertable Streams for MediaStreamTrack API creates a WritableStream that acts as a MediaStreamTrack source. The object consumes a stream of media frames as input, which can be audio or video frames.
Creates a new MediaStreamTrackGenerator object which accepts either VideoFrame or AudioData objects.
This interface also inherits properties from MediaStreamTrack.
MediaStreamTrackGenerator.writableThis interface doesn't implement any specific methods, but inherits methods from MediaStreamTrack.
The following example is from the article Insertable streams for MediaStreamTrack, and demonstrates a barcode scanner application, which process barcodes and highlights them before writing the transformed frames to the writable stream of MediaStreamTrackGenerator.writable.
Enable JavaScript to view this browser compatibility table.
This page was last modified on Apr 17, 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.