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.
new VideoTrackGenerator()In the following example a new video VideoTrackGenerator is created.
const trackGenerator = new VideoTrackGenerator();