further clean up with trick

This commit is contained in:
talksik
2022-05-03 10:25:31 -05:00
parent f4855727c1
commit 227d596f01
4 changed files with 22 additions and 6 deletions
-1
View File
@@ -1 +0,0 @@
declare module "@carbon/react";
@@ -6,9 +6,11 @@ import { ILineDetails } from "../../../pages/router/index";
import LineIcon from "../lineIcon";
export default function LineRow({
id,
lineDetails,
onClick,
}: {
id: string;
lineDetails: ILineDetails;
onClick: (lineId: string) => void;
}) {
@@ -80,7 +82,7 @@ export default function LineRow({
return (
<div
onClick={handleSelectLine}
id={lineDetails.lineId}
id={id}
className="flex flex-row items-center justify-start gap-2 p-2 px-4 h-14 hover:bg-gray-200 cursor-pointer transition-all
last:border-b-0 border-b border-b-gray-200"
>
+9 -2
View File
@@ -87,11 +87,12 @@ export default function Overlay() {
var localPeerInitiator = new Peer({
initiator: true,
stream: localStream,
trickle: false, // prevents the multiple tries on different ice servers and signal from getting called a bunch of times
});
localPeerInitiator.on("signal", (signal) => {
console.log(
"sending a signal to all users connected and adding local peer object",
"created local initiator peer and sending signal to: ",
userSocketId
);
@@ -130,9 +131,15 @@ export default function Overlay() {
console.log("ooo newbie joined room, I guess I will accept it ");
// if we are answering a received signal
var peerToCallerPeer = new Peer({ initiator: false });
var peerToCallerPeer = new Peer({
initiator: false,
trickle: false, // prevents the multiple tries on different ice servers and signal from getting called a bunch of times
});
peerToCallerPeer.on("signal", (signal) => {
console.log(
"as the answerer, I am going to send back my signal so that the newbie can update his local peer for me"
);
socket.emit(SocketChannels.SEND_SIGNAL, {
userSocketIdToSignal: payload.senderUserSocketId,
simplePeerSignal: signal,
+10 -2
View File
@@ -58,7 +58,11 @@ export default function NirvanaTerminal({
{/* list of all lines */}
<div className="flex flex-col mt-2">
{toggleTunedLines.map((line) => (
<LineRow lineDetails={line} onClick={handleSelectLine} />
<LineRow
id={line.lineId}
lineDetails={line}
onClick={handleSelectLine}
/>
))}
</div>
</div>
@@ -67,7 +71,11 @@ export default function NirvanaTerminal({
<div className={"flex flex-col"}>
{restLines.map((line) => (
<LineRow lineDetails={line} onClick={handleSelectLine} />
<LineRow
id={line.lineId}
lineDetails={line}
onClick={handleSelectLine}
/>
))}
</div>
</div>