Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

Commit

Permalink
security updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandawg93 committed Feb 23, 2020
1 parent 8ccc4f0 commit d419038
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/nestcam.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ class NestCam {
if (self.enabled) {
let sessionID = uuid.unparse(request['sessionID']);
let streamer = new NexusStreamer(self.nexusTalkHost, self.uuid, self.api.accessToken, self.ffmpegCodec, self.log);
self.sessions[sessionID] = streamer;
self.sessions[`${sessionID}`] = streamer;
streamer.prepareStream(request, callback);
}
}
Expand All @@ -229,7 +229,7 @@ class NestCam {

if (sessionID) {
let sessionIdentifier = uuid.unparse(sessionID);
let streamer = self.sessions[sessionIdentifier];
let streamer = self.sessions[`${sessionIdentifier}`];
if (!streamer) {
return;
}
Expand All @@ -238,7 +238,7 @@ class NestCam {
streamer.startPlaybackWithRequest(request);
} else if (requestType === 'stop') {
streamer.stopPlayback();
delete self.sessions[sessionIdentifier];
delete self.sessions[`${sessionIdentifier}`];
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/streamer.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ class NexusStreamer extends EventEmitter {
}

for (let i = 0; i < packet.channels.length; i++) {
var stream = packet.channels[i];
var stream = packet.channels[`${i}`];
if (stream.codec_type === CodecType.H264) {
self.videoChannelID = stream.channel_id;
} else if (stream.codec_type === CodecType.AAC || stream.codec_type === CodecType.OPUS) {
Expand Down

0 comments on commit d419038

Please sign in to comment.