MediaCaptureEvent

This event type is fired during media capture operations. It notifies Javascript that a media capture is in progress, and gives the script a chance to modify the FFMPEG command line parameters.

The event target for this event type is the mainWindow object.

The MediaCaptureEvent class has only one subtype:

The precapture event has access to the FFMPEG command line that's about to be executed, and can modify the command as needed. The event can also cancel the capture entirely for the current item by calling preventDefault() on the event object, and it can cancel the entire remainder of the current batch by setting the event object property cancelBatch to true:

mainWindow.on("precapture", ev => { ev.cancelBatch = true; });

Properties