W3C home > Mailing lists > Public > public-webrtc@w3.org > January 2015

Re: No way to stop sending media but still displaying it locally

From: Adam Roach <abr@mozilla.com>
Date: Wed, 28 Jan 2015 17:35:47 -0600
Message-ID: <54C97253.9030306@mozilla.com>
To: Iñaki Baz Castillo <ibc@aliax.net>, "public-webrtc@w3.org" <public-webrtc@w3.org>
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 
-- 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 


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
+1 650 903 0800 x863
Received on Wednesday, 28 January 2015 23:36:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:18:03 UTC