This commit is contained in:
talksik
2022-05-18 20:38:52 -05:00
parent 97c0b29480
commit a41f35dcee
@@ -78,7 +78,9 @@ export function StreamProvider({ children }: { children: React.ReactChild }) {
<MemoLineConnector <MemoLineConnector
key={`streamConnector-${line.lineDetails._id.toString()}`} key={`streamConnector-${line.lineDetails._id.toString()}`}
handleAddPeer={handleAddPeer} handleAddPeer={handleAddPeer}
line={line} membersToCall={line.tunedInMemberIds.filter(
(currMemberId) => currMemberId !== user._id.toString(),
)}
/> />
); );
})} })}
@@ -95,10 +97,10 @@ export default function useStreams() {
const MemoLineConnector = React.memo(LineConnector); const MemoLineConnector = React.memo(LineConnector);
function LineConnector({ function LineConnector({
line, membersToCall,
handleAddPeer, handleAddPeer,
}: { }: {
line: MasterLineData; membersToCall: string[];
handleAddPeer: (userId: string, peerObj: Peer) => void; handleAddPeer: (userId: string, peerObj: Peer) => void;
}) { }) {
console.log('rendering this piece of shit'); console.log('rendering this piece of shit');
@@ -106,7 +108,12 @@ function LineConnector({
useEffectOnce(() => { useEffectOnce(() => {
console.log('got initial list for this channel that I am tuned into'); console.log('got initial list for this channel that I am tuned into');
console.log(line.tunedInMemberIds); console.log(membersToCall);
// call these people
// tell them what line I'm calling about, so that they can use the signal for the right peer object
// also so that I can signal for the peer object relationship between me and this other person for this particular channel
// then add in the stream to this local peer relationship object
}); });
return <></>; return <></>;