video showing on one end

This commit is contained in:
talksik
2022-06-19 11:12:32 -05:00
parent 4fda5d97c4
commit 48355b66a5
2 changed files with 6 additions and 6 deletions
@@ -447,6 +447,8 @@ function Room({
audio: true,
});
console.log(localMediaStream);
setUserLocalStream(localMediaStream);
// ?will there be race condition where this room component is rendered but we don't have the latest
@@ -460,8 +462,6 @@ function Room({
);
toast.success('calling bunch of people');
setUserLocalStream(localMediaStream);
// for each person, create peer object
allOtherUserIds.forEach((otherUserId) => {
const connectingToast = toast.loading('calling peer for a snappy experience');
@@ -643,7 +643,7 @@ function Room({
// find our local connection to this peer in the room contents
setConversationMap((draft) => {
const localPeerForMasterAndMe = draft[res.lineId]?.room[res.lineId];
const localPeerForMasterAndMe = draft[res.lineId]?.room[res.masterUserId];
if (localPeerForMasterAndMe) {
localPeerForMasterAndMe.peer.signal(res.simplePeerSignal);
@@ -655,7 +655,7 @@ function Room({
$ws.removeAllListeners(mastersAnswerReceivedChannelNameForRoom);
$ws.removeAllListeners(someoneJoinedChannelNameForRoom);
};
});
}, [userLocalStream]);
// go through all of the peers and destroy and update conversation map
useUnmount(() => {