CaptureSettingsBuilder
Electron APIs / recorder / CaptureSettingsBuilder
A builder interface for constructing a complete CaptureSettings configuration.
Allows incremental addition of screen, game, and audio capture sources, as well as customization
of encoder and device settings. The builder supports chaining and returns a finalized
CaptureSettings object upon calling build()
.
See
Extends
Properties
Property | Type | Description |
---|---|---|
audioEncoder | AudioEncoderInfo | The audio encoder selected for encoding captured audio data. See AudioEncoderInfo |
audioSettings | AudioSettings | Settings related to input/output audio devices and application-specific audio capture. See AudioSettings |
sources | CaptureSource [] | List of media sources to capture (e.g., display, window, or game). See CaptureSource |
videoEncoderSettings | VideoEncoderSettingsBase | Encoder settings used for video compression. See VideoEncoderSettingsBase |
videoSettings | VideoSettings | Settings related to video resolution, frame rate, and color configuration. See VideoSettings |
Methods
addApplicationAudioCapture()
addApplicationAudioCapture(param: ApplicationAudioCaptureParams, settings?: AudioDeviceSettings): CaptureSettingsBuilder;
Adds application-specific audio capture based on process name.
Parameters
Parameter | Type | Description |
---|---|---|
param | ApplicationAudioCaptureParams | Application audio capture parameters. |
settings? | AudioDeviceSettings | Optional audio settings for the application. |
Returns
CaptureSettingsBuilder
The builder instance for chaining.
addAudioCapture()
addAudioCapture(params: AudioDeviceParams, settings?: AudioDeviceSettings): CaptureSettingsBuilder;
Adds an audio device for capturing input or output audio.
Parameters
Parameter | Type | Description |
---|---|---|
params | AudioDeviceParams | Parameters identifying the audio device. |
settings? | AudioDeviceSettings | Optional audio device settings. |
Returns
CaptureSettingsBuilder
The builder instance for chaining.
addAudioDefaultCapture()
addAudioDefaultCapture(
type: AudioDeviceType,
params?: DefaultAudioDeviceParams,
settings?: AudioDeviceSettings): CaptureSettingsBuilder;
Adds the default system audio device (input or output) if not already added.
Parameters
Parameter | Type | Description |
---|---|---|
type | AudioDeviceType | The device type (input or output ). |
params? | DefaultAudioDeviceParams | Optional configuration for default audio capture behavior. |
settings? | AudioDeviceSettings | Optional audio device settings. |
Returns
CaptureSettingsBuilder
The builder instance for chaining.
addGameSource()
addGameSource(settings: GameCaptureSourceSettings): CaptureSettingsBuilder;
Adds a game source to the capture settings.
Parameters
Parameter | Type | Description |
---|---|---|
settings | GameCaptureSourceSettings | The game capture configuration. |
Returns
CaptureSettingsBuilder
The builder instance for chaining.
addScreenSource()
addScreenSource(settings: MonitorCaptureSourceSettings): CaptureSettingsBuilder;
Adds a screen (monitor) source to the capture settings.
Parameters
Parameter | Type | Description |
---|---|---|
settings | MonitorCaptureSourceSettings | The screen capture configuration. |
Returns
CaptureSettingsBuilder
The builder instance for chaining.
build()
build(): CaptureSettings;
Finalizes the capture configuration and returns a CaptureSettings object.
Returns
The completed capture settings.