Hello thanks for you reply,
I tested and seems is not working as expected. For example in the peerconnectionclient example I added the following function:
bool Conductor::MuteVideo(bool value)
{
if (video_muted_ == value)
return false;
std::map<std::string, rtc::scoped_refptr<webrtc::MediaStreamInterface> >::const_iterator stream_it = active_streams_.find(kStreamLabel);
if (stream_it == active_streams_.end())
return false;
rtc::scoped_refptr<webrtc::MediaStreamInterface> stream = stream_it->second;
peer_connection_->RemoveStream(stream);
if (value)
{
//do mute
if (video_track)
{
main_wnd_->StopLocalRenderer();
stream->RemoveTrack(video_track);
}
}
else
{
rtc::scoped_refptr<webrtc::VideoTrackInterface> video_track(
peer_connection_factory_->CreateVideoTrack(kVideoLabel, peer_connection_factory_->CreateVideoSource(OpenVideoCaptureDevice(), NULL)));
main_wnd_->StartLocalRenderer(video_track);
stream->AddTrack(video_track);
}
if (!peer_connection_->AddStream(stream))
{
LOG(LS_ERROR) << "Remove stream to PeerConnection failed";
}
video_muted_ = value;
peer_connection_->CreateOffer(this, NULL);
return true;
}
When the function is called I can see the camera stopping and also the local stream disappearing but on the remote side the behavior is odd The on OnRemoveStream/OnAddStream is not called
I'm using the last webrtc version from master.
Silviu