Closed dandv closed 8 years ago
You can't. A track can be a member of multiple MediaStreams.
You can, however, create a new MediaStream with "new MediaStream(yourTrack)". There's no particular reason to use the original MediaStream, unless you want access to other track inside that MediaStream.
Closing as "not a spec issue".
Thanks @alvestrand, passing an array to the constructor worked.
I'm building a polyfill for the MediaStream ImageCapture API, and I've run into this issue: in order to create a
video
element and take a snapshot of it into acanvas
, I need access to the MediaStream; however, the ImageCapture constructor only takes a MediaStreamTrack parameter.How can I get from that track to its parent stream? The track was obtained via
getVideoTracks
.