-
-
Notifications
You must be signed in to change notification settings - Fork 338
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
Add support for MediaStreamTrack.clone() method #474
Comments
MediaStream.prototype.clone is implemented, test it and let me know. |
You right MediaStreamTrack is missing. |
This should works partially.
|
I also encountered this issue today. I tried to fix it based on your suggestion @hthetiot , but so far I wasn't successful. The first thing is that the new track needs a new Id - I could achieve that by just adding a new Id on the javascript side, analogous to MediaStream clone. However, it doesn't really work because on the swift side the newly cloned MediaStreamTrack should for example be in pluginMediaStreamTracks I guess? And I don't really understand what the spec means when they write:
Is the underlying souce the MediaStream? But what needs to be associated with what? Can you give so me some hints what is missing there, or do you plan to add this function soon @hthetiot ? Thanks |
Thank you @stolzda. I will look into it when i have a moment, but PR are welcome. |
Yes I was thinking something similar. In similar terms I think the MediaStream.clone() functionality may be not correct as well - as the specification states, that the associated MediaStreamTracks need to be cloned as well, and since we do not have a method to clone them, probably the current implementation is not correct? |
@stolzda Yeah |
TODO "the specification states, that the associated MediaStreamTracks need to be cloned" |
Please try this PR see testing instructions: |
MediaStreamTrack.clone method hasn't been implemented but it's in the spec.
https://w3c.github.io/mediacapture-main/#dom-mediastreamtrack-clone
The text was updated successfully, but these errors were encountered: