e01.org

MediaStreamTrackProcessor: MediaStreamTrackProcessor() constructor

Insertable Streams for MediaStreamTrack API

Insertable Streams for MediaStreamTrack API

The **`MediaStreamTrackProcessor()`** constructor creates a new MediaStreamTrackProcessor object which consumes a video MediaStreamTrack object's source and generates a stream of VideoFrames.

## Syntax

```js-nolint
new MediaStreamTrackProcessor(options)
```

### Parameters

- `options`
- : An object with the following properties:
- `track`
- : A MediaStreamTrack.
- `maxBufferSize`
- : An integer specifying the maximum number of media frames to be buffered.

## Examples

In the following example a new `MediaStreamTrackProcessor` is created.

```js
const trackProcessor = new MediaStreamTrackProcessor({ track: videoTrack });
```

## Specifications

## Browser compatibility

source: MDN Web Docs mirror · page

Cite this

"MediaStreamTrackProcessor: MediaStreamTrackProcessor() constructor". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrackProcessor/MediaStreamTrackProcessor

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy