- From: Adam Roach <abr@mozilla.com>
- Date: Wed, 28 Jan 2015 17:35:47 -0600
- To: Iñaki Baz Castillo <ibc@aliax.net>, "public-webrtc@w3.org" <public-webrtc@w3.org>
Received on Wednesday, 28 January 2015 23:36:17 UTC
I haven't played around with it, but I think you should be able to do this by creating a new "you're on hold" stream from a video element using MediaElement.captureStream() (see http://lists.w3.org/Archives/Public/public-media-capture/2013Feb/0079.html -- still prefixed in Firefox; I'm not sure if Chrome does this yet), and passing the corresponding video track into RTPSender.replaceTrack(). When you want to unhold the stream in the PC, swap back to the original stream. /a On 1/28/15 16:35, Iñaki Baz Castillo wrote: > Use case: > > 1) My local stream (mic&webcam) is being displayed on a <video> element. > 2) And it is also being sent to the peer via WebRTC. > 3) I want to "pause" my stream in the wire, but still view it in the > <video> element. > > > The only way to achieve bullet 2 (without stopping the PeerConnection > or removing the local stream form it) is by setting "enabled=false" in > each track of the local stream. But it also stops the local <video> > rendering (so it does not satisfy bullet 3). > > So I miss something? I couldn't find any solution in the spec(s). > > P.S. Would stream.clone() work in this case? > -- Adam Roach Principal Platform Engineer abr@mozilla.com +1 650 903 0800 x863
Received on Wednesday, 28 January 2015 23:36:17 UTC