Table of Contents

Method CreateInput

Namespace
OBSStudioClient
Assembly
OBSClient.dll

CreateInput(SceneRef, string, string, Dictionary<string, object>?, bool?, Guid?, CancellationToken)

Creates a new input, adding it as a scene item to the specified scene.

public Task<CreateInputResponse> CreateInput(SceneRef scene, string inputName, string inputKind, Dictionary<string, object>? inputSettings = null, bool? sceneItemEnabled = null, Guid? canvasUuid = null, CancellationToken cancellationToken = default)

Parameters

scene SceneRef

The scene to add the input to as a scene item, by name or by UUID.

inputName string

Name of the new input to created.

inputKind string

The kind of input to be created.

inputSettings Dictionary<string, object>

Settings object to initialize the input with. If omitted: Default settings used.

sceneItemEnabled bool?

Whether to set the created scene item to enabled or disabled. If omitted: True.

canvasUuid Guid?

UUID of the canvas the scene is in, if the scene is given by name.

cancellationToken CancellationToken

A token that ends the wait for the response, which makes the method throw an OperationCanceledException. A request that was already sent is not undone: OBS Studio may still carry it out.

Returns

Task<CreateInputResponse>

A CreateInputResponse with the response data.