MediaStreamTrackGenerator Class

A track created from the frames or the audio samples written to a stream (the legacy API of Chromium, replaced by VideoTrackGenerator): each VideoFrame (video track) or AudioData (audio track) written to the writable stream of the scripts is delivered to the sinks of the track, then closed.

public sealed class MediaStreamTrackGenerator : MediaStreamTrack
Inheritance
MediaStreamTrack MediaStreamTrackGenerator

Constructors

NameDescription
MediaStreamTrackGenerator(MediaStreamTrackGeneratorInit)Creates a generator of a kind.
MediaStreamTrackGenerator(string)Creates a generator of a kind.

MediaStreamTrackGenerator overloads

MediaStreamTrackGenerator(MediaStreamTrackGeneratorInit)

InsertableStreams.cs

Creates a generator of a kind.

public MediaStreamTrackGenerator(MediaStreamTrackGeneratorInit init)

MediaStreamTrackGenerator(string)

InsertableStreams.cs

Creates a generator of a kind.

public MediaStreamTrackGenerator(string kind)
Parameters
kind string
The kind of the track: audio or video.
Exceptions
TypeErrorException
The kind is invalid.
See also

Properties

NameDescription
WritableGets the WritableStream to which the scripts write the frames or the audio samples (an object of the realm of the scripts).

Gets the WritableStream to which the scripts write the frames or the audio samples (an object of the realm of the scripts).

public object Writable { get; }