Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try {
- // .... Additional code here
- const typecheck = await Promise.all(
- evoCfg.cameras.map(async camera => {
- if (camera.type === 'H264') {
- return await matchCamera(camera);
- } else if (camera.type === 'RTSP') {
- return await matchIP(camera);
- } else if (camera.type === 'AUDIO') {
- return await matchAudio(camera);
- } else {
- // Motion JPEG
- return true;
- }
- })
- );
- // .... additional code here
- console.log('results:);
- console.dir(typecheck, {depth: null, colors: true});
- } catch (e) {
- console.error('In Master Catch:', e);
- }
- results:
- [ true,
- true,
- true,
- true,
- true,
- true,
- Error: MAC for IP Cam not found on Network: 00:11:22:33:44:55
- at matchIP (/file.js:58:15)
- at process._tickCallback (internal/process/next_tick.js:68:7),
- true ]
- In Master Catch: MAC for IP Cam not found on Network: 00:11:22:33:44:55
- at matchIP (/file.js:58:15)
- at process._tickCallback (internal/process/next_tick.js:68:7)
- try {
- // .... Additional code here
- const typecheck = await Promise.all(
- evoCfg.cameras.map(camera => {
- if (camera.type === 'H264') {
- return matchCamera(camera);
- } else if (camera.type === 'RTSP') {
- return matchIP(camera);
- } else if (camera.type === 'AUDIO') {
- return matchAudio(camera);
- } else {
- // Motion JPEG
- return true;
- }
- })
- );
- // .... additional code here
- console.log('results:);
- console.dir(typecheck, {depth: null, colors: true});
- } catch (e) {
- console.error('In Master Catch:', e);
- }
- const typecheckArray = await Promise.all(
- evoCfg.cameras.map(camera => {
- if (camera.type === 'H264') {
- return matchCamera(camera);
- } else if (camera.type === 'RTSP') {
- return matchIP(camera);
- } else if (camera.type === 'AUDIO') {
- return matchAudio(camera);
- } else {
- // Motion JPEG
- return Promise.resolve(true);
- }
- })
- );
Add Comment
Please, Sign In to add comment