Skip to content

Commit

Permalink
fix getpeerconnelction list with audio & video
Browse files Browse the repository at this point in the history
  • Loading branch information
mpromonet committed Nov 4, 2023
1 parent f56d6ce commit ac42c0d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/PeerConnectionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1032,10 +1032,11 @@ const Json::Value PeerConnectionManager::getPeerConnectionList()
}
}

Json::Value tracks;
tracks[mediaTrack->id()] = track;
std::string streamLabel = localStream->stream_ids()[0];
streams[streamLabel] = tracks;
std::string streamLabel = localStream->stream_ids()[0];
if (!streams.isMember(streamLabel)) {
streams[streamLabel] = Json::Value(Json::objectValue);
}
streams[streamLabel][mediaTrack->id()] = track;
}
}
}
Expand Down

0 comments on commit ac42c0d

Please sign in to comment.