node-rtsp-recorder icon indicating copy to clipboard operation
node-rtsp-recorder copied to clipboard

Wrong url returns normal captureImage

Open zinen opened this issue 3 years ago • 0 comments

Inputting like a fake url when capturing images and captureImage just returns just normal. I would expect that an error was thrown or captureImage to return like false or someting.

Input url with: 1.1.1.1 or a string hi and everything just runs normaly but without generating a file.

Could this module give some feedback to weather a file was generated for me to handle when calling captureImage()?

    const Recorder = require('node-rtsp-recorder').Recorder

    var rec = new Recorder({
        url: 'hi',
        folder: '/Users/sahilchaddha/Sahil/Projects/Github/node-rtsp-recorder/videos',
        name: 'cam1',
        type: 'image',
    })

    rec.captureImage(() => {
        console.log('Image Captured')
    })

zinen avatar Jun 22 '21 14:06 zinen