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
sceneSceneRefThe scene to add the input to as a scene item, by name or by UUID.
inputNamestringName of the new input to created.
inputKindstringThe kind of input to be created.
inputSettingsDictionary<string, object>Settings object to initialize the input with. If omitted: Default settings used.
sceneItemEnabledbool?Whether to set the created scene item to enabled or disabled. If omitted: True.
canvasUuidGuid?UUID of the canvas the scene is in, if the scene is given by name.
cancellationTokenCancellationTokenA 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.