diff --git a/Backend/src/camera.config.ts b/Backend/src/camera.config.ts index 7fd32d2..8871dae 100644 --- a/Backend/src/camera.config.ts +++ b/Backend/src/camera.config.ts @@ -1 +1 @@ -export const cameraIds = [0, 1, 2, 3, 4, 5, 6, 7]; \ No newline at end of file +export const cameraIds = [0, 1, 2, 3, 4, 5, 6, 7]; diff --git a/Backend/src/cameraStream/cameraData.ts b/Backend/src/cameraStream/cameraData.ts index 262acbd..2db6e19 100644 --- a/Backend/src/cameraStream/cameraData.ts +++ b/Backend/src/cameraStream/cameraData.ts @@ -1,7 +1,4 @@ export type Camera = { id: string; name: string; - rtspUrl: string; - ip: string; - port: string; }; diff --git a/Backend/src/cameraStream/cameraStream.gateway.ts b/Backend/src/cameraStream/cameraStream.gateway.ts index dd20d06..e4c4069 100644 --- a/Backend/src/cameraStream/cameraStream.gateway.ts +++ b/Backend/src/cameraStream/cameraStream.gateway.ts @@ -58,14 +58,14 @@ export class CameraStreamGateway implements OnGatewayConnection { try { const session = await this.openvidu.instance.createSession({}); this.sessionId = session.sessionId; - + const nvr = await this.database.getNVRData(); nvr.channels.forEach((id: number) => { const connectionProperties: ConnectionProperties = { type: ConnectionType.IPCAM, rtspUri: `${nvr.ip}/ch${id}_0.264`, - adaptativeBitrate: true, - onlyPlayWithSubscribers: false, + adaptativeBitrate: true, + onlyPlayWithSubscribers: false, networkCache: 1000, data: id.toString(), }; diff --git a/Backend/src/database/database.service.ts b/Backend/src/database/database.service.ts index ad7f68c..a3bb4a3 100644 --- a/Backend/src/database/database.service.ts +++ b/Backend/src/database/database.service.ts @@ -233,7 +233,7 @@ export class DatabaseService { channels: cameraIds, }, ); - + return { ip: process.env.NVR_IP_ADDRESS, channels: array[0].channels,