video showing on one end
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user