cleanup
This commit is contained in:
@@ -66,8 +66,6 @@ export default function InitializeWs(io: any) {
|
|||||||
console.log('asdf');
|
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 */
|
/** CONNECT | User wants to subscribe to live emissions of a line */
|
||||||
socket.on(ServerRequestChannels.CONNECT_TO_LINE, (req: ConnectToLineRequest) => {
|
socket.on(ServerRequestChannels.CONNECT_TO_LINE, (req: ConnectToLineRequest) => {
|
||||||
// add this user to the room
|
// 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) => {
|
socket.on(ServerRequestChannels.RTC_CALL_SOMEONE_FOR_LINE, (req: RtcCallRequest) => {
|
||||||
console.log('slave calling a master');
|
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
|
// share audio to foreground conversation | either push to talk or toggle broadcasting
|
||||||
const handleStartTalking = useCallback((record = false) => {
|
const handleStartTalking = useCallback((record = false) => {
|
||||||
// if record, then start recording
|
// if record, then start recording
|
||||||
|
|||||||
Reference in New Issue
Block a user