W3C home > Mailing lists > Public > public-media-capture@w3.org > January 2016

[mediacapture-fromelement] Use with MediaSource

From: =^._.^= via GitHub <sysbot+gh@w3.org>
Date: Sat, 02 Jan 2016 23:40:58 +0000
To: public-media-capture@w3.org
Message-ID: <issues.opened-124617736-1451778058-sysbot+gh@w3.org>
maxogden has just created a new issue for 

== Use with MediaSource ==
Hi, I'm excited about this spec and about if it is designed to work 
well with MediaSource. 

E.g. if I create a custom MediaSource instance with `new 
MediaSource()` and acquire my own custom media stream via file/network
 I/O and hook it up to my MediaSource instance ([as is done 
here](https://gist.github.com/maxogden/108134f035decfcfdf15)), and 
then do `video.src = window.URL.createObjectURL(mediaSource)` to 
render it in a `<video>` tag, does that mean I can use `var 
captureStream = video.captureStream()` to transmit my custom 
MediaSource data over an e.g. WebRTC PeerConnection using 

It seems a little unnecessary to me to have to use a `<video>` tag at 
all to send data from a `MediaSource` over a `PeerConnection`, is 
there another way? `PeerConnection` only accepts `MediaStream` 
instances and from what I can tell it seems this new 
`video.captureStream` method will be the only way to get a 
`MediaStream` instance from a `MediaSource`.

Also, will there be any performance downside to 'routing' the 
`MediaSource` through a `<video>` element, when I don't actually wan't
 to display the `<video>` element in the DOM, I just want to use it to
 get a capture stream? E.g. does this result in my video being 

Please view or discuss this issue at 
https://github.com/w3c/mediacapture-fromelement/issues/19 using your 
GitHub account
Received on Saturday, 2 January 2016 23:40:59 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:26:35 UTC