This commit is contained in:
talksik
2022-06-19 09:44:11 -05:00
parent 1e99173295
commit 226ca56eeb
2 changed files with 7 additions and 14 deletions
+1 -2
View File
@@ -66,8 +66,6 @@ export default function InitializeWs(io: any) {
console.log('asdf');
});
// ?verification that user is in a particular line to be tuned into it or just generally in it?
/** CONNECT | User wants to subscribe to live emissions of a line */
socket.on(ServerRequestChannels.CONNECT_TO_LINE, (req: ConnectToLineRequest) => {
// add this user to the room
@@ -125,6 +123,7 @@ export default function InitializeWs(io: any) {
);
});
// ============== STREAMING ================
socket.on(ServerRequestChannels.RTC_CALL_SOMEONE_FOR_LINE, (req: RtcCallRequest) => {
console.log('slave calling a master');
@@ -541,20 +541,14 @@ function Room({
});
};
}
// ======= LISTEN FOR INCOMING CALLS AND ACCEPT THEM
return () => {
localPeersForRoom.forEach((peerToClose) => peerToClose.destroy());
};
});
const handleJoinRoom = useCallback((roomId: string) => {
// call up folks and then have listeners for the peer connection objects that we created
// such as when peer connection closes, we want to remove from our list of peers for such conversation
// error handler as well for the peer connection
// rest endpoint to get all of the folks in a certain room
}, []);
const handleLeaveRoom = useCallback(() => {
// untune from line
// destroy peer connections
}, []);
// share audio to foreground conversation | either push to talk or toggle broadcasting
const handleStartTalking = useCallback((record = false) => {
// if record, then start recording