Compare commits
11 Commits
LINXD-2842
...
develop
Author | SHA1 | Date | |
---|---|---|---|
755df1ec5a | |||
cd91d40dd0 | |||
642dba8dac | |||
4f044555ba | |||
230d5b6bce | |||
73c7700ded | |||
9e66772b53 | |||
5ef66af3f8 | |||
1b29d43580 | |||
dd5af12c7c | |||
a5c00ba10a |
@ -5,7 +5,7 @@ WORKDIR /app
|
||||
RUN apt-get update && \
|
||||
apt-get install -y build-essential pip net-tools iputils-ping iproute2 curl
|
||||
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
|
||||
RUN apt-get install -y nodejs
|
||||
|
||||
COPY . /app/
|
||||
|
10
app.js
10
app.js
@ -542,6 +542,15 @@ const isInitiator = (callId, socketId) => {
|
||||
return videoCalls[callId]?.initiatorSocket?.id === socketId;
|
||||
};
|
||||
|
||||
const emitToParticipants = (callId, event, message) => {
|
||||
try {
|
||||
videoCalls[callId].receiverSocket.emit(event, message);
|
||||
videoCalls[callId].initiatorSocket.emit(event, message);
|
||||
} catch (error) {
|
||||
console.error(`[emitToParticipants] | ERROR | callId: ${callId} | error: ${error.message}`);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
- Called from at event 'createWebRtcTransport' and assigned to the consumer or producer transport
|
||||
- It will return parameters, these are required for the client to create the RecvTransport
|
||||
@ -584,6 +593,7 @@ const createWebRtcTransportLayer = async (callId, callback) => {
|
||||
console.log(`[ICE STATE CHANGE] callId: ${callId} | State: ${iceState}`);
|
||||
if (iceState === 'failed' || iceState === 'disconnected') {
|
||||
console.warn(`⚠️ ICE failure detected for callId: ${callId}! Possible UDP blockage.`);
|
||||
emitToParticipants(callId, 'connection-failed', { callId });
|
||||
}
|
||||
});
|
||||
|
||||
|
4
build.sh
4
build.sh
@ -51,11 +51,11 @@ if [ -d "node_modules" ]; then
|
||||
fi
|
||||
|
||||
# Install dependencies
|
||||
#npm install
|
||||
npm install
|
||||
|
||||
## PROJECT NEEDS
|
||||
echo "Building app... from $(git rev-parse --abbrev-ref HEAD)"
|
||||
#npm run-script build
|
||||
npm run-script build
|
||||
cp -r {.env,app.js,package.json,server,public,doc,Dockerfile} dist/
|
||||
#cp -r ./* dist/
|
||||
|
||||
|
BIN
doc/[video] Video - Connection error.png
Normal file
BIN
doc/[video] Video - Connection error.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 215 KiB |
@ -29,4 +29,4 @@
|
||||
"ts-node-dev": "^2.0.0",
|
||||
"watchify": "^4.0.0"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user