Skip to content

Commit

Permalink
set to run the application
Browse files Browse the repository at this point in the history
  • Loading branch information
computer committed Jan 25, 2024
1 parent 63056f9 commit a1b9431
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Backend/.env-openvidu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
OPENVIDU_SECRET=MY_SECRET
OPENVIDU_WEBHOOK=true
OPENVIDU_WEBHOOK_ENDPOINT=https://backend:8080/media-server
OPENVIDU_WEBHOOK_ENDPOINT=https://localhost:8080/media-server


6 changes: 3 additions & 3 deletions Backend/src/cameraStream/cameraStream.gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: true,
adaptativeBitrate: true,
onlyPlayWithSubscribers: false,
networkCache: 1000,
data: id.toString(),
};
Expand Down
3 changes: 2 additions & 1 deletion Backend/src/database/database.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,9 @@ export class DatabaseService {
channels: cameraIds,
},
);

return {
ip: array[0].ip,
ip: process.env.NVR_IP_ADDRESS,
channels: array[0].channels,
};

Expand Down

0 comments on commit a1b9431

Please sign in to comment.