electron-screencapture
Library that allows to take a picture or a video from any fragment of the display.
API
takeScreenshot({x, y, width, height, sourceId})
Takes static screenshot and returns promise with the result.
x, y, width, height
- these params define the rectangle of the framesourceId
- id of the display, primary display by default
Example
; ;
captureVideo({x, y, width, height, sourceId})
Starts recording and returns promise with the object with the control api.
x, y, width, height
- these params define the rectangle of the framesourceId
- id of the display, primary display by default
Control API object
stop()
- stops recording and returns promise with the videopause()
- pauses recordingresume()
- resumes recording if paused
Example
; ;