seems like handshake is working...note to be careful as webpack not doing a good job always
This commit is contained in:
@@ -55,8 +55,8 @@
|
|||||||
[
|
[
|
||||||
"@electron-forge/plugin-webpack",
|
"@electron-forge/plugin-webpack",
|
||||||
{
|
{
|
||||||
"port": "4002",
|
"port": "4000",
|
||||||
"loggerPort": "9005",
|
"loggerPort": "9002",
|
||||||
"mainConfig": "./webpack.main.config.js",
|
"mainConfig": "./webpack.main.config.js",
|
||||||
"devContentSecurityPolicy": "connect-src 'self' http://localhost:5000 ws://localhost:5000 'unsafe-eval'",
|
"devContentSecurityPolicy": "connect-src 'self' http://localhost:5000 ws://localhost:5000 'unsafe-eval'",
|
||||||
"renderer": {
|
"renderer": {
|
||||||
|
|||||||
@@ -264,6 +264,7 @@ function StreamRoom({
|
|||||||
console.log(
|
console.log(
|
||||||
"ooo newbie joined room, I guess I will accept it and send him my signal"
|
"ooo newbie joined room, I guess I will accept it and send him my signal"
|
||||||
);
|
);
|
||||||
|
console.log(res);
|
||||||
|
|
||||||
var peerForMeAndNewbie = new Peer({
|
var peerForMeAndNewbie = new Peer({
|
||||||
initiator: false,
|
initiator: false,
|
||||||
@@ -297,11 +298,21 @@ function StreamRoom({
|
|||||||
$ws.on(
|
$ws.on(
|
||||||
`${ServerResponseChannels.RTC_RECEIVING_ANSWER_RESPONSE_PREFIX}:${lineId}`,
|
`${ServerResponseChannels.RTC_RECEIVING_ANSWER_RESPONSE_PREFIX}:${lineId}`,
|
||||||
(res: RtcReceiveAnswerResponse) => {
|
(res: RtcReceiveAnswerResponse) => {
|
||||||
console.log("oooo some master received my call and accepted it");
|
console.log(
|
||||||
|
`oooo some master received my call and accepted it ${JSON.stringify(
|
||||||
|
res
|
||||||
|
)}`
|
||||||
|
);
|
||||||
|
console.log(res);
|
||||||
|
|
||||||
// find the peer we created earlier for this master
|
// find the peer we created earlier for this master
|
||||||
// ?is this okay? using the setter to get the current state?
|
// ?is this okay? using the setter to get the current state?
|
||||||
setUserPeers((previousUserPeersMap) => {
|
setUserPeers((previousUserPeersMap) => {
|
||||||
|
console.log(
|
||||||
|
"here is the current peers map",
|
||||||
|
previousUserPeersMap
|
||||||
|
);
|
||||||
|
|
||||||
const peerForAnswerer =
|
const peerForAnswerer =
|
||||||
previousUserPeersMap[res.answererUserId];
|
previousUserPeersMap[res.answererUserId];
|
||||||
|
|
||||||
@@ -342,6 +353,11 @@ function StreamRoom({
|
|||||||
// calculate diff to clean our userPeerMap to unmount and detroy certain peer connections
|
// calculate diff to clean our userPeerMap to unmount and detroy certain peer connections
|
||||||
useEffect(() => {}, [tunedInUsers]);
|
useEffect(() => {}, [tunedInUsers]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
console.log("keeping an eye on user peers map");
|
||||||
|
console.log(userPeers);
|
||||||
|
}, [userPeers]);
|
||||||
|
|
||||||
// todo, someone tell the main object that I am finally connected after everything...different than tuned in
|
// todo, someone tell the main object that I am finally connected after everything...different than tuned in
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user