Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is MediaStreamTrackProcessor needed? #73

Open
youennf opened this issue Jan 19, 2022 · 1 comment
Open

Is MediaStreamTrackProcessor needed? #73

youennf opened this issue Jan 19, 2022 · 1 comment

Comments

@youennf
Copy link
Contributor

youennf commented Jan 19, 2022

MediaStreamTrackProcessor usefulness is very limited. It also does not match VideoTrackGenerator.
First MediaStreamTrackProcessor name is agnostic of audio vs. video which is not great with regards to the debate on audio support.

Second its usefulness as a construct is unclear to me given there is only a getter for the ReadableStream object.
It seems like we would create a MediaStreamTrackProcessor, to get a ReadableStream and the MediaStreamTrackProcessor would be GCed right away.

It seems we could replace the API to something like:
partial interface MediaStreamTrack {
ReadableStream createVideoReadableStream(VideoReadableStreamOptions options);
}

That does not mean there would not be a MediaStreamTrackProcessor object in the spec or in implementations.
There is a need for such an object to represent the source of the ReadableStream and to be the sink of the track.
But I do not see a use for exposing this object to JavaScript, as it does not seem to serve any other purpose than getting the ReadableStream.

@alvestrand
Copy link
Contributor

This was heavily discussed when we had the "shape of the API" discussion. The consensus was that we would go with MediaStreamTrackProcessor because it was able to process any kind of MediaStreamTrack, and VideoTrackGenerator / AudioTrackGenerator because the type of input data was different.

We have implementations, we have code that uses this.
I don't see a reason to reopen this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants