Skip to content

Commit

Permalink
Now preview window is supposed to come up only when you connect to yo…
Browse files Browse the repository at this point in the history
…ur first video peer.
  • Loading branch information
Manjesh Malavalli committed Dec 15, 2011
1 parent ae44c35 commit 6166960
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/js_api/projects/WebrtcPlugin/WPLCall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ namespace GoCast


#if(defined(GOCAST_ENABLE_VIDEO) && defined(GOCAST_LINUX))
if(false == IsActive())
if(false == bAudioOnly && true == m_AVParticipants.empty())
{

std::string title = "me";
Expand All @@ -103,6 +103,11 @@ namespace GoCast
#endif

m_Participants[peerId] = peerName;
if(false == bAudioOnly)
{
m_AVParticipants[peerId] = peerName;
}

m_Observers[peerId] = new PeerConnectionObserver(
m_pMsgQ,
&m_pWorkerThread,
Expand Down Expand Up @@ -154,10 +159,11 @@ namespace GoCast
m_Observers.erase(peerId);
removedPeerName = m_Participants[peerId];
m_Participants.erase(peerId);
m_AVParticipants.erase(peerId);
ListParticipants();

#if(defined(GOCAST_ENABLE_VIDEO) && defined(GOCAST_LINUX))
if(false == IsActive())
if(true == m_AVParticipants.empty())
{
m_pMediaEngine->SetLocalRenderer(NULL);
m_pLocalRenderer->Deinit();
Expand Down
2 changes: 2 additions & 0 deletions src/js_api/projects/WebrtcPlugin/WPLCall.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ namespace GoCast
*/
Participants m_Participants;

Participants m_AVParticipants;

/**
List of peer connection observers (peerid, GoCast::PeerConnectionObserver*).
*/
Expand Down

0 comments on commit 6166960

Please sign in to comment.