further clean up with trick
This commit is contained in:
Vendored
-1
@@ -1 +0,0 @@
|
|||||||
declare module "@carbon/react";
|
|
||||||
@@ -6,9 +6,11 @@ import { ILineDetails } from "../../../pages/router/index";
|
|||||||
import LineIcon from "../lineIcon";
|
import LineIcon from "../lineIcon";
|
||||||
|
|
||||||
export default function LineRow({
|
export default function LineRow({
|
||||||
|
id,
|
||||||
lineDetails,
|
lineDetails,
|
||||||
onClick,
|
onClick,
|
||||||
}: {
|
}: {
|
||||||
|
id: string;
|
||||||
lineDetails: ILineDetails;
|
lineDetails: ILineDetails;
|
||||||
onClick: (lineId: string) => void;
|
onClick: (lineId: string) => void;
|
||||||
}) {
|
}) {
|
||||||
@@ -80,7 +82,7 @@ export default function LineRow({
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
onClick={handleSelectLine}
|
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
|
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"
|
last:border-b-0 border-b border-b-gray-200"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -87,11 +87,12 @@ export default function Overlay() {
|
|||||||
var localPeerInitiator = new Peer({
|
var localPeerInitiator = new Peer({
|
||||||
initiator: true,
|
initiator: true,
|
||||||
stream: localStream,
|
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) => {
|
localPeerInitiator.on("signal", (signal) => {
|
||||||
console.log(
|
console.log(
|
||||||
"sending a signal to all users connected and adding local peer object",
|
"created local initiator peer and sending signal to: ",
|
||||||
userSocketId
|
userSocketId
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -130,9 +131,15 @@ export default function Overlay() {
|
|||||||
console.log("ooo newbie joined room, I guess I will accept it ");
|
console.log("ooo newbie joined room, I guess I will accept it ");
|
||||||
|
|
||||||
// if we are answering a received signal
|
// 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) => {
|
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, {
|
socket.emit(SocketChannels.SEND_SIGNAL, {
|
||||||
userSocketIdToSignal: payload.senderUserSocketId,
|
userSocketIdToSignal: payload.senderUserSocketId,
|
||||||
simplePeerSignal: signal,
|
simplePeerSignal: signal,
|
||||||
|
|||||||
@@ -58,7 +58,11 @@ export default function NirvanaTerminal({
|
|||||||
{/* list of all lines */}
|
{/* list of all lines */}
|
||||||
<div className="flex flex-col mt-2">
|
<div className="flex flex-col mt-2">
|
||||||
{toggleTunedLines.map((line) => (
|
{toggleTunedLines.map((line) => (
|
||||||
<LineRow lineDetails={line} onClick={handleSelectLine} />
|
<LineRow
|
||||||
|
id={line.lineId}
|
||||||
|
lineDetails={line}
|
||||||
|
onClick={handleSelectLine}
|
||||||
|
/>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -67,7 +71,11 @@ export default function NirvanaTerminal({
|
|||||||
|
|
||||||
<div className={"flex flex-col"}>
|
<div className={"flex flex-col"}>
|
||||||
{restLines.map((line) => (
|
{restLines.map((line) => (
|
||||||
<LineRow lineDetails={line} onClick={handleSelectLine} />
|
<LineRow
|
||||||
|
id={line.lineId}
|
||||||
|
lineDetails={line}
|
||||||
|
onClick={handleSelectLine}
|
||||||
|
/>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user