Compare commits

...

12 Commits

Author SHA1 Message Date
32692f2390 replace classic build for docker 2025-04-03 21:19:15 +00:00
755df1ec5a Merge pull request 'LINXD-2850: Add handler on icestatechange failed/disconnected to send 'connection-failed' event to participants' (#39) from LINXD-2850-connection-failed-handler into develop
Reviewed-on: #39
Reviewed-by: Cristi Ene <cristi.ene@safemobile.com>
2025-03-12 15:22:30 +00:00
cd91d40dd0 LINXD-2850: Added image in doc 2025-03-12 09:56:09 +02:00
642dba8dac LINXD-2850: Add handler on icestatechange failed/disconnected to send 'connection-failed' event to participants 2025-03-12 09:31:36 +02:00
4f044555ba Merge pull request 'Update node version in Dockerfile' (#38) from update-build into develop
Reviewed-on: #38
2025-03-07 09:35:02 +00:00
230d5b6bce Merge branch 'develop' into update-build 2025-03-07 09:34:33 +00:00
73c7700ded Update node version in Dockerfile 2025-03-07 11:33:47 +02:00
9e66772b53 Merge pull request 'update-build' (#37) from update-build into develop
Reviewed-on: #37
2025-03-07 09:14:06 +00:00
5ef66af3f8 Update build.sh 2025-03-07 11:12:56 +02:00
1b29d43580 Update build.sh 2025-03-07 11:12:12 +02:00
dd5af12c7c Merge pull request 'LINXD-2842-log-protocol-change' (#36) from LINXD-2842-log-protocol-change into develop
Reviewed-on: #36
Reviewed-by: Cristi Ene <cristi.ene@safemobile.com>
2025-03-05 21:40:24 +00:00
a5c00ba10a update documentation 2025-02-27 13:34:55 +02:00
5 changed files with 13 additions and 3 deletions

View File

@ -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
View File

@ -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 });
}
});

View File

@ -56,7 +56,7 @@ fi
## PROJECT NEEDS
echo "Building app... from $(git rev-parse --abbrev-ref HEAD)"
#npm run-script build
cp -r {.env,app.js,package.json,server,public,doc,Dockerfile} dist/
cp -r {.env,app.js,package.json,server,public,doc,Dockerfile,tsconfig.json,.dockerignore} dist/
#cp -r ./* dist/
# Generate Git log

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

View File

@ -29,4 +29,4 @@
"ts-node-dev": "^2.0.0",
"watchify": "^4.0.0"
}
}
}