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

It is unclear from the spec whether cloning a MediaStreamTrack preserves the subtype or not of the cloned track #857

Open
youennf opened this issue Jan 25, 2022 · 4 comments
Assignees

Comments

@youennf
Copy link
Contributor

youennf commented Jan 25, 2022

It is unclear from the spec whether cloning a MediaStreamTrack preserves the subtype or not of the cloned track.
This can be tested for canvas tracks and cloning does preserve the subtype.
It might be good to add a note stating this intent in this spec.

@eladalon1983
Copy link
Member

eladalon1983 commented Jan 25, 2022

I think it should preserve the type, but the sub-type should be able to specify how state is handled, if that state was introduced by the sub-type. For example, a hypothetical sub-type called CroppableMediaStreamTrack should be able to specify that a clone is either also cropped or starts out uncropped. (Which choice it makes is out of scope; I only argue here that it should be up to the sub-type to make such a decision.)

@youennf
Copy link
Contributor Author

youennf commented Jan 25, 2022

I think it should preserve the type

Agreed.

it should be up to the sub-type to make such a decision.

Sounds good, my hope is that the default values of the sub type slots should hopefully be good enough in most cases so that nothing special is usually needed on sub type specs for cloning.

@alvestrand
Copy link
Contributor

Note to self: Same issue exists with transfer (but that's not in this document).

@dontcallmedom
Copy link
Member

re-assigning to @youennf based on #864 (comment)

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

Successfully merging a pull request may close this issue.

5 participants