Disable Media Stream

40 views
Skip to first unread message

vigneshwaran s

unread,
Nov 25, 2015, 7:48:50 AM11/25/15
to discuss-webrtc
Hello ,


Assume peer-peer connection between  A -> B 

I m trying to  disable Video stream in A , so that the user B shouldn't get the  video of A. I m trying to do this as show below ; 

var videoTrack = localStream.getVideoTracks();
for(var i=0;i<videoTrack.length;i++)
{
videoTrack[i].enabled = false;
}

My queries here are :

1) Even after disabling the videstream, will the media packets be transmitted ?? If the media packets will still be transmitted , then how can I prevent the video stream transmitted to user B.
2 ) My case is to have my Video ( local video ) in user A , but to just disable the A 's Video in B side . I tried using the RTCPeerConnection.removeStream() API . This is working in chrome but it is not working in Firefox ( even in the latest version.).Can you please provide me a work-around at least for Firefox to accomplish my case.


Regards,
Vignesh

Iñaki Baz Castillo

unread,
Nov 25, 2015, 4:16:00 PM11/25/15
to discuss...@googlegroups.com
2015-11-25 13:48 GMT+01:00 vigneshwaran s <vigneshwa...@gmail.com>:

> 1) Even after disabling the videstream, will the media packets be
> transmitted ??

No. Just some "black" video frames will be sent to user B.




--
Iñaki Baz Castillo
<i...@aliax.net>

vigneshwaran s

unread,
Nov 25, 2015, 11:50:34 PM11/25/15
to discuss-webrtc
My case is to have my Video ( local video ) in user A , but to just disable the A 's Video in B side . I tried using the RTCPeerConnection.removeStream() API . This is working in chrome but it is not working in Firefox ( even in the latest version.).Can you please provide me a work-around at least for Firefox to accomplish my case.

Iñaki Baz Castillo

unread,
Nov 26, 2015, 6:16:12 AM11/26/15
to discuss...@googlegroups.com
2015-11-26 5:50 GMT+01:00 vigneshwaran s <vigneshwa...@gmail.com>:
> My case is to have my Video ( local video ) in user A , but to just disable
> the A 's Video in B side . I tried using the
> RTCPeerConnection.removeStream() API . This is working in chrome but it is
> not working in Firefox ( even in the latest version.).Can you please provide
> me a work-around at least for Firefox to accomplish my case.

Unfertunatelly AFAIR Firefox does not even support MediaStream.clone()
which would let you cloning your local stream and appending the cloned
one into your local <video> element, so you just disable tracks in the
stream set into the PeerConnection.
Reply all
Reply to author
Forward
0 new messages