Skip to content

Commit

Permalink
minors
Browse files Browse the repository at this point in the history
  • Loading branch information
Glydric committed Jan 25, 2024
1 parent a1b9431 commit 6c49061
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Backend/src/camera.config.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const cameraIds = [0, 1, 2, 3, 4, 5, 6, 7];
export const cameraIds = [0, 1, 2, 3, 4, 5, 6, 7];
3 changes: 0 additions & 3 deletions Backend/src/cameraStream/cameraData.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
export type Camera = {
id: string;
name: string;
rtspUrl: string;
ip: string;
port: string;
};
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: false,
adaptativeBitrate: true,
onlyPlayWithSubscribers: false,
networkCache: 1000,
data: id.toString(),
};
Expand Down
2 changes: 1 addition & 1 deletion Backend/src/database/database.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export class DatabaseService {
channels: cameraIds,
},
);

return {
ip: process.env.NVR_IP_ADDRESS,
channels: array[0].channels,
Expand Down

0 comments on commit 6c49061

Please sign in to comment.