VideoTrackGenerator: VideoTrackGenerator() constructor

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The VideoTrackGenerator() constructor creates a new VideoTrackGenerator object which consumes a stream of media frames and exposes a MediaStreamTrack.

Syntax

js
new VideoTrackGenerator()

Examples

In the following example a new video VideoTrackGenerator is created.

js
const trackGenerator = new VideoTrackGenerator();

Specifications

Specification
MediaStreamTrack Insertable Media Processing using Streams
# dom-videotrackgenerator-videotrackgenerator

Browser compatibility

See also