Compare commits

..

7 Commits

Author SHA1 Message Date
13829c5e6c Update build.sh 2022-11-18 11:42:01 +02:00
9047e6c47d Update log 2022-11-18 11:35:18 +02:00
77da298944 Update log 2022-11-18 11:03:12 +02:00
c25e34bc37 Update log 2022-11-18 10:57:19 +02:00
9a25f16924 Update log 2022-11-18 10:33:53 +02:00
473f94fcbb Update log 2022-11-18 10:28:21 +02:00
9245373625 Update log 2022-11-18 10:21:32 +02:00
6 changed files with 699 additions and 406 deletions

View File

2
app.js
View File

@ -154,7 +154,7 @@ peers.on('connection', async socket => {
try {
// We can continue with the room creation process only if we have a callId
if (callId) {
console.log(`[createRoom] socket.id ${socket.id} callId ${callId}`);
console.log(`[createRoom] --🟥-- socket.id ${socket.id} callId ${callId}`);
if (!videoCalls[callId]) {
console.log('[createRoom] callId', callId);
videoCalls[callId] = { router: await worker.createRouter({ mediaCodecs }) }

View File

@ -15,6 +15,7 @@ fi
## PROJECT NEEDS
echo "Building app... from $(git rev-parse --abbrev-ref HEAD)"
#npm run-script build
cp .env.example .env
cp -r {.env,app.js,package.json,server,public} dist/
#Add version control for pm2
@ -44,5 +45,4 @@ fi
## POST BUILD
cd -
rm .env

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,5 @@
module.exports = {
hubAddress: 'https://hub.dev.linx.safemobile.com/',
mediasoupAddress: 'https://video.safemobile.org',
mediasoupAddress: 'https://video.safemobile.org/mediasoup',
// mediasoupAddress: 'http://localhost:3000/mediasoup',
}

View File

@ -12,13 +12,8 @@ let callId = parseInt(urlParams.get('callId')) || null;
const IS_PRODUCER = urlParams.get('producer') === 'true' ? true : false
console.log('[URL] ASSET_ID', ASSET_ID, '| ACCOUNT_ID', ACCOUNT_ID, '| callId', callId, ' | IS_PRODUCER', IS_PRODUCER)
console.log('🟩 config', config)
let socket
setTimeout(() => {
hub = io(config.hubAddress)
}, 2000);
hub = io(config.hubAddress)
const connectToMediasoup = () => {
@ -41,7 +36,7 @@ const connectToMediasoup = () => {
if (IS_PRODUCER === true) {
hub.on('connect', async () => {
console.log(`[HUB]! ${config.hubAddress} | connected: ${hub.connected}`)
console.log(`[HUB] ${config.hubAddress} | connected: ${hub.connected}`)
connectToMediasoup()
hub.emit(
@ -140,7 +135,7 @@ const streamSuccess = (stream) => {
const getLocalStream = () => {
console.log('[getLocalStream]');
navigator.mediaDevices.getUserMedia({
audio: true,
audio: false,
video: {
width: {
min: 640,