Compare commits

..

12 Commits

Author SHA1 Message Date
c247afdbe3 updated procedure 2025-03-21 14:14:40 +02: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
6 changed files with 31 additions and 4 deletions

View File

@ -5,7 +5,7 @@ WORKDIR /app
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y build-essential pip net-tools iputils-ping iproute2 curl 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 RUN apt-get install -y nodejs
COPY . /app/ COPY . /app/

View File

@ -1,5 +1,22 @@
# Video server # Video server
### Running Docker
Output from history. Customize with your own container identifier
```Bash
docker build -t linx-video .
docker ps
docker stop ad5
docker rm ad5
docker run -it -d --restart always -p 3000:3000/tcp -p 2000-2200:2000-2200/tcp -p 2000-2200:2000-2200/udp linx-video
docker logs 736 -f
cat .env
docker logs 736 -f
```
### Generating certificates ### Generating certificates
##### To generate SSL certificates you must: ##### To generate SSL certificates you must:

10
app.js
View File

@ -542,6 +542,15 @@ const isInitiator = (callId, socketId) => {
return videoCalls[callId]?.initiatorSocket?.id === 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 - 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 - 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}`); console.log(`[ICE STATE CHANGE] callId: ${callId} | State: ${iceState}`);
if (iceState === 'failed' || iceState === 'disconnected') { if (iceState === 'failed' || iceState === 'disconnected') {
console.warn(`⚠️ ICE failure detected for callId: ${callId}! Possible UDP blockage.`); console.warn(`⚠️ ICE failure detected for callId: ${callId}! Possible UDP blockage.`);
emitToParticipants(callId, 'connection-failed', { callId });
} }
}); });

View File

@ -51,11 +51,11 @@ if [ -d "node_modules" ]; then
fi fi
# Install dependencies # Install dependencies
#npm install npm install
## PROJECT NEEDS ## PROJECT NEEDS
echo "Building app... from $(git rev-parse --abbrev-ref HEAD)" 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 {.env,app.js,package.json,server,public,doc,Dockerfile} dist/
#cp -r ./* dist/ #cp -r ./* dist/

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB