diff --git a/docs/generated/comments.json b/docs/generated/comments.json index 4abf8a0c..5c32f28a 100644 --- a/docs/generated/comments.json +++ b/docs/generated/comments.json @@ -1330,7 +1330,7 @@ "{double} `version` OBSRemote compatible API version. Fixed to 1.1 for retrocompatibility.", "{String} `obs-websocket-version` obs-websocket plugin version.", "{String} `obs-studio-version` OBS Studio program version.", - "{String|Array} `available-requests` List of available request types." + "{String} `available-requests` List of available request types, formatted as a comma-separated list string (e.g. : \"Method1,Method2,Method3\")." ], "api": "requests", "name": "GetVersion", @@ -1353,9 +1353,9 @@ "description": "OBS Studio program version." }, { - "type": "String|Array", + "type": "String", "name": "available-requests", - "description": "List of available request types." + "description": "List of available request types, formatted as a comma-separated list string (e.g. : \"Method1,Method2,Method3\")." } ], "names": [ @@ -1487,6 +1487,7 @@ "api": "requests", "name": "SetHeartbeat", "category": "general", + "since": "unreleased", "params": [ { "type": "boolean", @@ -1506,6 +1507,12 @@ "description": "general" } ], + "sinces": [ + { + "name": "", + "description": "unreleased" + } + ], "heading": { "level": 2, "text": "SetHeartbeat" @@ -1925,7 +1932,7 @@ }, { "subheads": [], - "description": "Save and flush the contents of the Replay Buffer to disk. This is\nbasically the same as triggering the \"Save Replay Buffer\" hotkey.\nWill return an `error` if the Replay Buffer is not active.", + "description": "Flush and save the contents of the Replay Buffer to disk. This is\nbasically the same as triggering the \"Save Replay Buffer\" hotkey.\nWill return an `error` if the Replay Buffer is not active.", "api": "requests", "name": "SaveReplayBuffer", "category": "replay buffer", @@ -2039,6 +2046,678 @@ "lead": "", "type": "class", "examples": [] + }, + { + "subheads": [], + "description": "List available scene collections", + "return": [ + "{Object|Array} `scene-collections` Scene collections list", + "{String} `scene-collections.*.`" + ], + "api": "requests", + "name": "ListSceneCollections", + "category": "scene collections", + "since": "4.0.0", + "returns": [ + { + "type": "Object|Array", + "name": "scene-collections", + "description": "Scene collections list" + }, + { + "type": "String", + "name": "scene-collections.*.", + "description": "" + } + ], + "names": [ + { + "name": "", + "description": "ListSceneCollections" + } + ], + "categories": [ + { + "name": "", + "description": "scene collections" + } + ], + "sinces": [ + { + "name": "", + "description": "4.0.0" + } + ], + "heading": { + "level": 2, + "text": "ListSceneCollections" + }, + "lead": "", + "type": "class", + "examples": [] + } + ], + "scene items": [ + { + "subheads": [], + "description": "Gets the scene specific properties of the specified source item.", + "param": [ + "{String (optional)} `scene-name` the name of the scene that the source item belongs to. Defaults to the current scene.", + "{String} `item` The name of the source." + ], + "return": [ + "{String} `name` The name of the source.", + "{int} `position.x` The x position of the source from the left.", + "{int} `position.y` The y position of the source from the top.", + "{int} `position.alignment` The point on the source that the item is manipulated from.", + "{double} `rotation` The clockwise rotation of the item in degrees around the point of alignment.", + "{double} `scale.x` The x-scale factor of the source.", + "{double} `scale.y` The y-scale factor of the source.", + "{int} `crop.top` The number of pixels cropped off the top of the source before scaling.", + "{int} `crop.right` The number of pixels cropped off the right of the source before scaling.", + "{int} `crop.bottom` The number of pixels cropped off the bottom of the source before scaling.", + "{int} `crop.left` The number of pixels cropped off the left of the source before scaling.", + "{bool} `visible` If the source is visible.", + "{String} `bounds.type` Type of bounding box.", + "{int} `bounds.alignment` Alignment of the bounding box.", + "{double} `bounds.x` Width of the bounding box.", + "{double} `bounds.y` Height of the bounding box." + ], + "api": "requests", + "name": "GetSceneItemProperties", + "category": "scene items", + "since": "unreleased", + "returns": [ + { + "type": "String", + "name": "name", + "description": "The name of the source." + }, + { + "type": "int", + "name": "position.x", + "description": "The x position of the source from the left." + }, + { + "type": "int", + "name": "position.y", + "description": "The y position of the source from the top." + }, + { + "type": "int", + "name": "position.alignment", + "description": "The point on the source that the item is manipulated from." + }, + { + "type": "double", + "name": "rotation", + "description": "The clockwise rotation of the item in degrees around the point of alignment." + }, + { + "type": "double", + "name": "scale.x", + "description": "The x-scale factor of the source." + }, + { + "type": "double", + "name": "scale.y", + "description": "The y-scale factor of the source." + }, + { + "type": "int", + "name": "crop.top", + "description": "The number of pixels cropped off the top of the source before scaling." + }, + { + "type": "int", + "name": "crop.right", + "description": "The number of pixels cropped off the right of the source before scaling." + }, + { + "type": "int", + "name": "crop.bottom", + "description": "The number of pixels cropped off the bottom of the source before scaling." + }, + { + "type": "int", + "name": "crop.left", + "description": "The number of pixels cropped off the left of the source before scaling." + }, + { + "type": "bool", + "name": "visible", + "description": "If the source is visible." + }, + { + "type": "String", + "name": "bounds.type", + "description": "Type of bounding box." + }, + { + "type": "int", + "name": "bounds.alignment", + "description": "Alignment of the bounding box." + }, + { + "type": "double", + "name": "bounds.x", + "description": "Width of the bounding box." + }, + { + "type": "double", + "name": "bounds.y", + "description": "Height of the bounding box." + } + ], + "params": [ + { + "type": "String (optional)", + "name": "scene-name", + "description": "the name of the scene that the source item belongs to. Defaults to the current scene." + }, + { + "type": "String", + "name": "item", + "description": "The name of the source." + } + ], + "names": [ + { + "name": "", + "description": "GetSceneItemProperties" + } + ], + "categories": [ + { + "name": "", + "description": "scene items" + } + ], + "sinces": [ + { + "name": "", + "description": "unreleased" + } + ], + "heading": { + "level": 2, + "text": "GetSceneItemProperties" + }, + "lead": "", + "type": "class", + "examples": [] + }, + { + "subheads": [], + "description": "Sets the scene specific properties of a source. Unspecified properties will remain unchanged.", + "param": [ + "{String (optional)} `scene-name` the name of the scene that the source item belongs to. Defaults to the current scene.", + "{String} `item` The name of the source.", + "{int} `position.x` The new x position of the source.", + "{int} `position.y` The new y position of the source.", + "{int} `position.alignment` The new alignment of the source.", + "{double} `rotation` The new clockwise rotation of the item in degrees.", + "{double} `scale.x` The new x scale of the item.", + "{double} `scale.y` The new y scale of the item.", + "{int} `crop.top` The new amount of pixels cropped off the top of the source before scaling.", + "{int} `crop.bottom` The new amount of pixels cropped off the bottom of the source before scaling.", + "{int} `crop.left` The new amount of pixels cropped off the left of the source before scaling.", + "{int} `crop.right` The new amount of pixels cropped off the right of the source before scaling.", + "{bool} `visible` The new visibility of the source. 'true' shows source, 'false' hides source.", + "{String} `bounds.type` The new bounds type of the source.", + "{int} `bounds.alignment` The new alignment of the bounding box. (0-2, 4-6, 8-10)", + "{double} `bounds.x` The new width of the bounding box.", + "{double} `bounds.y` The new height of the bounding box." + ], + "api": "requests", + "name": "SetSceneItemProperties", + "category": "scene items", + "since": "unreleased", + "params": [ + { + "type": "String (optional)", + "name": "scene-name", + "description": "the name of the scene that the source item belongs to. Defaults to the current scene." + }, + { + "type": "String", + "name": "item", + "description": "The name of the source." + }, + { + "type": "int", + "name": "position.x", + "description": "The new x position of the source." + }, + { + "type": "int", + "name": "position.y", + "description": "The new y position of the source." + }, + { + "type": "int", + "name": "position.alignment", + "description": "The new alignment of the source." + }, + { + "type": "double", + "name": "rotation", + "description": "The new clockwise rotation of the item in degrees." + }, + { + "type": "double", + "name": "scale.x", + "description": "The new x scale of the item." + }, + { + "type": "double", + "name": "scale.y", + "description": "The new y scale of the item." + }, + { + "type": "int", + "name": "crop.top", + "description": "The new amount of pixels cropped off the top of the source before scaling." + }, + { + "type": "int", + "name": "crop.bottom", + "description": "The new amount of pixels cropped off the bottom of the source before scaling." + }, + { + "type": "int", + "name": "crop.left", + "description": "The new amount of pixels cropped off the left of the source before scaling." + }, + { + "type": "int", + "name": "crop.right", + "description": "The new amount of pixels cropped off the right of the source before scaling." + }, + { + "type": "bool", + "name": "visible", + "description": "The new visibility of the source. 'true' shows source, 'false' hides source." + }, + { + "type": "String", + "name": "bounds.type", + "description": "The new bounds type of the source." + }, + { + "type": "int", + "name": "bounds.alignment", + "description": "The new alignment of the bounding box. (0-2, 4-6, 8-10)" + }, + { + "type": "double", + "name": "bounds.x", + "description": "The new width of the bounding box." + }, + { + "type": "double", + "name": "bounds.y", + "description": "The new height of the bounding box." + } + ], + "names": [ + { + "name": "", + "description": "SetSceneItemProperties" + } + ], + "categories": [ + { + "name": "", + "description": "scene items" + } + ], + "sinces": [ + { + "name": "", + "description": "unreleased" + } + ], + "heading": { + "level": 2, + "text": "SetSceneItemProperties" + }, + "lead": "", + "type": "class", + "examples": [] + }, + { + "subheads": [], + "description": "Reset a scene item.", + "param": [ + "{String (optional)} `scene-name` Name of the scene the source belogns to. Defaults to the current scene.", + "{String} `item` Name of the source item." + ], + "api": "requests", + "name": "ResetSceneItem", + "category": "scene items", + "since": "4.2.0", + "params": [ + { + "type": "String (optional)", + "name": "scene-name", + "description": "Name of the scene the source belogns to. Defaults to the current scene." + }, + { + "type": "String", + "name": "item", + "description": "Name of the source item." + } + ], + "names": [ + { + "name": "", + "description": "ResetSceneItem" + } + ], + "categories": [ + { + "name": "", + "description": "scene items" + } + ], + "sinces": [ + { + "name": "", + "description": "4.2.0" + } + ], + "heading": { + "level": 2, + "text": "ResetSceneItem" + }, + "lead": "", + "type": "class", + "examples": [] + }, + { + "subheads": [], + "description": "Show or hide a specified source item in a specified scene.", + "param": [ + "{String} `source` Scene item name in the specified scene.", + "{boolean} `render` true = shown ; false = hidden", + "{String (optional)} `scene-name` Name of the scene where the source resides. Defaults to the currently active scene." + ], + "api": "requests", + "name": "SetSceneItemRender", + "category": "scene items", + "since": "0.3", + "deprecated": "Since unreleased. Prefer the use of SetSceneItemProperties.", + "params": [ + { + "type": "String", + "name": "source", + "description": "Scene item name in the specified scene." + }, + { + "type": "boolean", + "name": "render", + "description": "true = shown ; false = hidden" + }, + { + "type": "String (optional)", + "name": "scene-name", + "description": "Name of the scene where the source resides. Defaults to the currently active scene." + } + ], + "names": [ + { + "name": "", + "description": "SetSceneItemRender" + } + ], + "categories": [ + { + "name": "", + "description": "scene items" + } + ], + "sinces": [ + { + "name": "", + "description": "0.3" + } + ], + "deprecateds": [ + { + "name": "", + "description": "Since unreleased. Prefer the use of SetSceneItemProperties." + } + ], + "heading": { + "level": 2, + "text": "SetSceneItemRender" + }, + "lead": "", + "type": "class", + "examples": [] + }, + { + "subheads": [], + "description": "Sets the coordinates of a specified source item.", + "param": [ + "{String (optional)} `scene-name` The name of the scene that the source item belongs to. Defaults to the current scene.", + "{String} `item` The name of the source item.", + "{double} `x` X coordinate.", + "{double} `y` Y coordinate." + ], + "api": "requests", + "name": "SetSceneItemPosition", + "category": "scene items", + "since": "4.0.0", + "deprecated": "Since unreleased. Prefer the use of SetSceneItemProperties.", + "params": [ + { + "type": "String (optional)", + "name": "scene-name", + "description": "The name of the scene that the source item belongs to. Defaults to the current scene." + }, + { + "type": "String", + "name": "item", + "description": "The name of the source item." + }, + { + "type": "double", + "name": "x", + "description": "X coordinate." + }, + { + "type": "double", + "name": "y", + "description": "Y coordinate." + } + ], + "names": [ + { + "name": "", + "description": "SetSceneItemPosition" + } + ], + "categories": [ + { + "name": "", + "description": "scene items" + } + ], + "sinces": [ + { + "name": "", + "description": "4.0.0" + } + ], + "deprecateds": [ + { + "name": "", + "description": "Since unreleased. Prefer the use of SetSceneItemProperties." + } + ], + "heading": { + "level": 2, + "text": "SetSceneItemPosition" + }, + "lead": "", + "type": "class", + "examples": [] + }, + { + "subheads": [], + "description": "Set the transform of the specified source item.", + "param": [ + "{String (optional)} `scene-name` The name of the scene that the source item belongs to. Defaults to the current scene.", + "{String} `item` The name of the source item.", + "{double} `x-scale` Width scale factor.", + "{double} `y-scale` Height scale factor.", + "{double} `rotation` Source item rotation (in degrees)." + ], + "api": "requests", + "name": "SetSceneItemTransform", + "category": "scene items", + "since": "4.0.0", + "deprecated": "Since unreleased. Prefer the use of SetSceneItemProperties.", + "params": [ + { + "type": "String (optional)", + "name": "scene-name", + "description": "The name of the scene that the source item belongs to. Defaults to the current scene." + }, + { + "type": "String", + "name": "item", + "description": "The name of the source item." + }, + { + "type": "double", + "name": "x-scale", + "description": "Width scale factor." + }, + { + "type": "double", + "name": "y-scale", + "description": "Height scale factor." + }, + { + "type": "double", + "name": "rotation", + "description": "Source item rotation (in degrees)." + } + ], + "names": [ + { + "name": "", + "description": "SetSceneItemTransform" + } + ], + "categories": [ + { + "name": "", + "description": "scene items" + } + ], + "sinces": [ + { + "name": "", + "description": "4.0.0" + } + ], + "deprecateds": [ + { + "name": "", + "description": "Since unreleased. Prefer the use of SetSceneItemProperties." + } + ], + "heading": { + "level": 2, + "text": "SetSceneItemTransform" + }, + "lead": "", + "type": "class", + "examples": [] + }, + { + "subheads": [], + "description": "Sets the crop coordinates of the specified source item.", + "param": [ + "{String (optional)} `scene-name` the name of the scene that the source item belongs to. Defaults to the current scene.", + "{String} `item` The name of the source.", + "{int} `top` Pixel position of the top of the source item.", + "{int} `bottom` Pixel position of the bottom of the source item.", + "{int} `left` Pixel position of the left of the source item.", + "{int} `right` Pixel position of the right of the source item." + ], + "api": "requests", + "name": "SetSceneItemCrop", + "category": "scene items", + "since": "4.1.0", + "deprecated": "Since unreleased. Prefer the use of SetSceneItemProperties.", + "params": [ + { + "type": "String (optional)", + "name": "scene-name", + "description": "the name of the scene that the source item belongs to. Defaults to the current scene." + }, + { + "type": "String", + "name": "item", + "description": "The name of the source." + }, + { + "type": "int", + "name": "top", + "description": "Pixel position of the top of the source item." + }, + { + "type": "int", + "name": "bottom", + "description": "Pixel position of the bottom of the source item." + }, + { + "type": "int", + "name": "left", + "description": "Pixel position of the left of the source item." + }, + { + "type": "int", + "name": "right", + "description": "Pixel position of the right of the source item." + } + ], + "names": [ + { + "name": "", + "description": "SetSceneItemCrop" + } + ], + "categories": [ + { + "name": "", + "description": "scene items" + } + ], + "sinces": [ + { + "name": "", + "description": "4.1.0" + } + ], + "deprecateds": [ + { + "name": "", + "description": "Since unreleased. Prefer the use of SetSceneItemProperties." + } + ], + "heading": { + "level": 2, + "text": "SetSceneItemCrop" + }, + "lead": "", + "type": "class", + "examples": [] } ], "scenes": [ @@ -2185,38 +2864,43 @@ "sources": [ { "subheads": [], - "description": "Show or hide a specified source item in a specified scene.", - "param": [ - "{String} `source` Name of the source in the specified scene.", - "{boolean} `render` Desired visibility.", - "{String (optional)} `scene-name` Name of the scene where the source resides. Defaults to the currently active scene." + "description": "List all sources available in the running OBS instance", + "return": [ + "{Array of Objects} `sources` Array of sources as objects", + "{String} `sources.*.name` Unique source name", + "{String} `sources.*.typeId` Non-unique source internal type (a.k.a type id)", + "{String} `sources.*.type` Source type. Value is one of the following: \"input\", \"filter\", \"transition\", \"scene\" or \"unknown\"" ], "api": "requests", - "name": "SetSourceRender", + "name": "GetSourcesList", "category": "sources", - "since": "0.3", - "deprecated": "Since unreleased. Prefer the use of SetSceneItemProperties.", - "params": [ + "since": "unreleased", + "returns": [ + { + "type": "Array of Objects", + "name": "sources", + "description": "Array of sources as objects" + }, { "type": "String", - "name": "source", - "description": "Name of the source in the specified scene." + "name": "sources.*.name", + "description": "Unique source name" }, { - "type": "boolean", - "name": "render", - "description": "Desired visibility." + "type": "String", + "name": "sources.*.typeId", + "description": "Non-unique source internal type (a.k.a type id)" }, { - "type": "String (optional)", - "name": "scene-name", - "description": "Name of the scene where the source resides. Defaults to the currently active scene." + "type": "String", + "name": "sources.*.type", + "description": "Source type. Value is one of the following: \"input\", \"filter\", \"transition\", \"scene\" or \"unknown\"" } ], "names": [ { "name": "", - "description": "SetSourceRender" + "description": "GetSourcesList" } ], "categories": [ @@ -2228,18 +2912,12 @@ "sinces": [ { "name": "", - "description": "0.3" - } - ], - "deprecateds": [ - { - "name": "", - "description": "Since unreleased. Prefer the use of SetSceneItemProperties." + "description": "unreleased" } ], "heading": { "level": 2, - "text": "SetSourceRender" + "text": "GetSourcesList" }, "lead": "", "type": "class", @@ -2247,31 +2925,97 @@ }, { "subheads": [], - "description": "Set the volume of the specified source.", - "param": [ - "{String} `source` Name of the source.", - "{double} `volume` Desired volume. Must be between `0.0` and `1.0`." + "description": "Get a list of all available sources types", + "return": [ + "{Array of Objects} `ids` Array of sources as objects", + "{String} `ids.*.typeId` Non-unique internal source type ID", + "{String} `ids.*.displayName` Display name of the source type", + "{String} `ids.*.type` Type. Value is one of the following: \"input\", \"filter\", \"transition\" or \"other\"", + "{Object} `ids.*.defaultSettings` Default settings of this source type", + "{Object} `ids.*.caps` Source type capabilities", + "{Boolean} `ids.*.caps.isAsync` True if source of this type provide frames asynchronously", + "{Boolean} `ids.*.caps.hasVideo` True if sources of this type provide video", + "{Boolean} `ids.*.caps.hasAudio` True if sources of this type provide audio", + "{Boolean} `ids.*.caps.canInteract` True if interaction with this sources of this type is possible", + "{Boolean} `ids.*.caps.isComposite` True if sources of this type composite one or more sub-sources", + "{Boolean} `ids.*.caps.doNotDuplicate` True if sources of this type should not be fully duplicated", + "{Boolean} `ids.*.caps.doNotSelfMonitor` True if sources of this type may cause a feedback loop if it's audio is monitored and shouldn't be" ], "api": "requests", - "name": "SetVolume", + "name": "GetSourcesTypesList", "category": "sources", - "since": "4.0.0", - "params": [ + "since": "unreleased", + "returns": [ { - "type": "String", - "name": "source", - "description": "Name of the source." + "type": "Array of Objects", + "name": "ids", + "description": "Array of sources as objects" }, { - "type": "double", - "name": "volume", - "description": "Desired volume. Must be between `0.0` and `1.0`." + "type": "String", + "name": "ids.*.typeId", + "description": "Non-unique internal source type ID" + }, + { + "type": "String", + "name": "ids.*.displayName", + "description": "Display name of the source type" + }, + { + "type": "String", + "name": "ids.*.type", + "description": "Type. Value is one of the following: \"input\", \"filter\", \"transition\" or \"other\"" + }, + { + "type": "Object", + "name": "ids.*.defaultSettings", + "description": "Default settings of this source type" + }, + { + "type": "Object", + "name": "ids.*.caps", + "description": "Source type capabilities" + }, + { + "type": "Boolean", + "name": "ids.*.caps.isAsync", + "description": "True if source of this type provide frames asynchronously" + }, + { + "type": "Boolean", + "name": "ids.*.caps.hasVideo", + "description": "True if sources of this type provide video" + }, + { + "type": "Boolean", + "name": "ids.*.caps.hasAudio", + "description": "True if sources of this type provide audio" + }, + { + "type": "Boolean", + "name": "ids.*.caps.canInteract", + "description": "True if interaction with this sources of this type is possible" + }, + { + "type": "Boolean", + "name": "ids.*.caps.isComposite", + "description": "True if sources of this type composite one or more sub-sources" + }, + { + "type": "Boolean", + "name": "ids.*.caps.doNotDuplicate", + "description": "True if sources of this type should not be fully duplicated" + }, + { + "type": "Boolean", + "name": "ids.*.caps.doNotSelfMonitor", + "description": "True if sources of this type may cause a feedback loop if it's audio is monitored and shouldn't be" } ], "names": [ { "name": "", - "description": "SetVolume" + "description": "GetSourcesTypesList" } ], "categories": [ @@ -2283,12 +3027,12 @@ "sinces": [ { "name": "", - "description": "4.0.0" + "description": "unreleased" } ], "heading": { "level": 2, - "text": "SetVolume" + "text": "GetSourcesTypesList" }, "lead": "", "type": "class", @@ -2359,72 +3103,31 @@ }, { "subheads": [], - "description": "Inverts the mute status of a specified source.", - "param": "{String} `source` The name of the source.", - "api": "requests", - "name": "ToggleMute", - "category": "sources", - "since": "4.0.0", - "params": [ - { - "type": "String", - "name": "source", - "description": "The name of the source." - } - ], - "names": [ - { - "name": "", - "description": "ToggleMute" - } - ], - "categories": [ - { - "name": "", - "description": "sources" - } - ], - "sinces": [ - { - "name": "", - "description": "4.0.0" - } - ], - "heading": { - "level": 2, - "text": "ToggleMute" - }, - "lead": "", - "type": "class", - "examples": [] - }, - { - "subheads": [], - "description": "Sets the mute status of a specified source.", + "description": "Set the volume of the specified source.", "param": [ - "{String} `source` The name of the source.", - "{boolean} `mute` Desired mute status." + "{String} `source` Name of the source.", + "{double} `volume` Desired volume. Must be between `0.0` and `1.0`." ], "api": "requests", - "name": "SetMute", + "name": "SetVolume", "category": "sources", "since": "4.0.0", "params": [ { "type": "String", "name": "source", - "description": "The name of the source." + "description": "Name of the source." }, { - "type": "boolean", - "name": "mute", - "description": "Desired mute status." + "type": "double", + "name": "volume", + "description": "Desired volume. Must be between `0.0` and `1.0`." } ], "names": [ { "name": "", - "description": "SetMute" + "description": "SetVolume" } ], "categories": [ @@ -2441,7 +3144,7 @@ ], "heading": { "level": 2, - "text": "SetMute" + "text": "SetVolume" }, "lead": "", "type": "class", @@ -2504,6 +3207,96 @@ "type": "class", "examples": [] }, + { + "subheads": [], + "description": "Sets the mute status of a specified source.", + "param": [ + "{String} `source` The name of the source.", + "{boolean} `mute` Desired mute status." + ], + "api": "requests", + "name": "SetMute", + "category": "sources", + "since": "4.0.0", + "params": [ + { + "type": "String", + "name": "source", + "description": "The name of the source." + }, + { + "type": "boolean", + "name": "mute", + "description": "Desired mute status." + } + ], + "names": [ + { + "name": "", + "description": "SetMute" + } + ], + "categories": [ + { + "name": "", + "description": "sources" + } + ], + "sinces": [ + { + "name": "", + "description": "4.0.0" + } + ], + "heading": { + "level": 2, + "text": "SetMute" + }, + "lead": "", + "type": "class", + "examples": [] + }, + { + "subheads": [], + "description": "Inverts the mute status of a specified source.", + "param": "{String} `source` The name of the source.", + "api": "requests", + "name": "ToggleMute", + "category": "sources", + "since": "4.0.0", + "params": [ + { + "type": "String", + "name": "source", + "description": "The name of the source." + } + ], + "names": [ + { + "name": "", + "description": "ToggleMute" + } + ], + "categories": [ + { + "name": "", + "description": "sources" + } + ], + "sinces": [ + { + "name": "", + "description": "4.0.0" + } + ], + "heading": { + "level": 2, + "text": "ToggleMute" + }, + "lead": "", + "type": "class", + "examples": [] + }, { "subheads": [], "description": "Set the audio sync offset of a specified source.", @@ -2612,353 +3405,53 @@ }, { "subheads": [], - "description": "Sets the coordinates of a specified source item.", + "description": "Get settings of the specified source", "param": [ - "{String (optional)} `scene-name` The name of the scene that the source item belongs to. Defaults to the current scene.", - "{String} `item` The name of the source item.", - "{double} `x` X coordinate.", - "{double} `y` Y coordinate." - ], - "api": "requests", - "name": "SetSceneItemPosition", - "category": "sources", - "since": "4.0.0", - "deprecated": "Since unreleased. Prefer the use of SetSceneItemProperties.", - "params": [ - { - "type": "String (optional)", - "name": "scene-name", - "description": "The name of the scene that the source item belongs to. Defaults to the current scene." - }, - { - "type": "String", - "name": "item", - "description": "The name of the source item." - }, - { - "type": "double", - "name": "x", - "description": "X coordinate." - }, - { - "type": "double", - "name": "y", - "description": "Y coordinate." - } - ], - "names": [ - { - "name": "", - "description": "SetSceneItemPosition" - } - ], - "categories": [ - { - "name": "", - "description": "sources" - } - ], - "sinces": [ - { - "name": "", - "description": "4.0.0" - } - ], - "deprecateds": [ - { - "name": "", - "description": "Since unreleased. Prefer the use of SetSceneItemProperties." - } - ], - "heading": { - "level": 2, - "text": "SetSceneItemPosition" - }, - "lead": "", - "type": "class", - "examples": [] - }, - { - "subheads": [], - "description": "Set the transform of the specified source item.", - "param": [ - "{String (optional)} `scene-name` The name of the scene that the source item belongs to. Defaults to the current scene.", - "{String} `item` The name of the source item.", - "{double} `x-scale` Width scale factor.", - "{double} `y-scale` Height scale factor.", - "{double} `rotation` Source item rotation (in degrees)." - ], - "api": "requests", - "name": "SetSceneItemTransform", - "category": "sources", - "since": "4.0.0", - "deprecated": "Since unreleased. Prefer the use of SetSceneItemProperties.", - "params": [ - { - "type": "String (optional)", - "name": "scene-name", - "description": "The name of the scene that the source item belongs to. Defaults to the current scene." - }, - { - "type": "String", - "name": "item", - "description": "The name of the source item." - }, - { - "type": "double", - "name": "x-scale", - "description": "Width scale factor." - }, - { - "type": "double", - "name": "y-scale", - "description": "Height scale factor." - }, - { - "type": "double", - "name": "rotation", - "description": "Source item rotation (in degrees)." - } - ], - "names": [ - { - "name": "", - "description": "SetSceneItemTransform" - } - ], - "categories": [ - { - "name": "", - "description": "sources" - } - ], - "sinces": [ - { - "name": "", - "description": "4.0.0" - } - ], - "deprecateds": [ - { - "name": "", - "description": "Since unreleased. Prefer the use of SetSceneItemProperties." - } - ], - "heading": { - "level": 2, - "text": "SetSceneItemTransform" - }, - "lead": "", - "type": "class", - "examples": [] - }, - { - "subheads": [], - "description": "Sets the crop coordinates of the specified source item.", - "param": [ - "{String (optional)} `scene-name` the name of the scene that the source item belongs to. Defaults to the current scene.", - "{String} `item` The name of the source.", - "{int} `top` Pixel position of the top of the source item.", - "{int} `bottom` Pixel position of the bottom of the source item.", - "{int} `left` Pixel position of the left of the source item.", - "{int} `right` Pixel position of the right of the source item." - ], - "api": "requests", - "name": "SetSceneItemCrop", - "category": "sources", - "since": "4.1.0", - "deprecated": "Since unreleased. Prefer the use of SetSceneItemProperties.", - "params": [ - { - "type": "String (optional)", - "name": "scene-name", - "description": "the name of the scene that the source item belongs to. Defaults to the current scene." - }, - { - "type": "String", - "name": "item", - "description": "The name of the source." - }, - { - "type": "int", - "name": "top", - "description": "Pixel position of the top of the source item." - }, - { - "type": "int", - "name": "bottom", - "description": "Pixel position of the bottom of the source item." - }, - { - "type": "int", - "name": "left", - "description": "Pixel position of the left of the source item." - }, - { - "type": "int", - "name": "right", - "description": "Pixel position of the right of the source item." - } - ], - "names": [ - { - "name": "", - "description": "SetSceneItemCrop" - } - ], - "categories": [ - { - "name": "", - "description": "sources" - } - ], - "sinces": [ - { - "name": "", - "description": "4.1.0" - } - ], - "deprecateds": [ - { - "name": "", - "description": "Since unreleased. Prefer the use of SetSceneItemProperties." - } - ], - "heading": { - "level": 2, - "text": "SetSceneItemCrop" - }, - "lead": "", - "type": "class", - "examples": [] - }, - { - "subheads": [], - "description": "Gets the scene specific properties of the specified source item.", - "param": [ - "{String (optional)} `scene-name` the name of the scene that the source item belongs to. Defaults to the current scene.", - "{String} `item` The name of the source." + "{String} `sourceName` Name of the source item.", + "{String (optional)} `sourceType` Type of the specified source. Useful for type-checking if you expect a specific settings schema." ], "return": [ - "{String} `name` The name of the source.", - "{int} `position.x` The x position of the source from the left.", - "{int} `position.y` The y position of the source from the top.", - "{int} `position.alignment` The point on the source that the item is manipulated from.", - "{double} `rotation` The clockwise rotation of the item in degrees around the point of alignment.", - "{double} `scale.x` The x-scale factor of the source.", - "{double} `scale.y` The y-scale factor of the source.", - "{int} `crop.top` The number of pixels cropped off the top of the source before scaling.", - "{int} `crop.right` The number of pixels cropped off the right of the source before scaling.", - "{int} `crop.bottom` The number of pixels cropped off the bottom of the source before scaling.", - "{int} `crop.left` The number of pixels cropped off the left of the source before scaling.", - "{bool} `visible` If the source is visible.", - "{String} `bounds.type` Type of bounding box.", - "{int} `bounds.alignment` Alignment of the bounding box.", - "{double} `bounds.x` Width of the bounding box.", - "{double} `bounds.y` Height of the bounding box." + "{String} `sourceName` Source name", + "{String} `sourceType` Type of the specified source", + "{Object} `sourceSettings` Source settings. Varying between source types." ], "api": "requests", - "name": "GetSceneItemProperties", + "name": "GetSourceSettings", "category": "sources", "since": "unreleased", "returns": [ { "type": "String", - "name": "name", - "description": "The name of the source." - }, - { - "type": "int", - "name": "position.x", - "description": "The x position of the source from the left." - }, - { - "type": "int", - "name": "position.y", - "description": "The y position of the source from the top." - }, - { - "type": "int", - "name": "position.alignment", - "description": "The point on the source that the item is manipulated from." - }, - { - "type": "double", - "name": "rotation", - "description": "The clockwise rotation of the item in degrees around the point of alignment." - }, - { - "type": "double", - "name": "scale.x", - "description": "The x-scale factor of the source." - }, - { - "type": "double", - "name": "scale.y", - "description": "The y-scale factor of the source." - }, - { - "type": "int", - "name": "crop.top", - "description": "The number of pixels cropped off the top of the source before scaling." - }, - { - "type": "int", - "name": "crop.right", - "description": "The number of pixels cropped off the right of the source before scaling." - }, - { - "type": "int", - "name": "crop.bottom", - "description": "The number of pixels cropped off the bottom of the source before scaling." - }, - { - "type": "int", - "name": "crop.left", - "description": "The number of pixels cropped off the left of the source before scaling." - }, - { - "type": "bool", - "name": "visible", - "description": "If the source is visible." + "name": "sourceName", + "description": "Source name" }, { "type": "String", - "name": "bounds.type", - "description": "Type of bounding box." + "name": "sourceType", + "description": "Type of the specified source" }, { - "type": "int", - "name": "bounds.alignment", - "description": "Alignment of the bounding box." - }, - { - "type": "double", - "name": "bounds.x", - "description": "Width of the bounding box." - }, - { - "type": "double", - "name": "bounds.y", - "description": "Height of the bounding box." + "type": "Object", + "name": "sourceSettings", + "description": "Source settings. Varying between source types." } ], "params": [ { - "type": "String (optional)", - "name": "scene-name", - "description": "the name of the scene that the source item belongs to. Defaults to the current scene." + "type": "String", + "name": "sourceName", + "description": "Name of the source item." }, { - "type": "String", - "name": "item", - "description": "The name of the source." + "type": "String (optional)", + "name": "sourceType", + "description": "Type of the specified source. Useful for type-checking if you expect a specific settings schema." } ], "names": [ { "name": "", - "description": "GetSceneItemProperties" + "description": "GetSourceSettings" } ], "categories": [ @@ -2975,7 +3468,7 @@ ], "heading": { "level": 2, - "text": "GetSceneItemProperties" + "text": "GetSourceSettings" }, "lead": "", "type": "class", @@ -2983,121 +3476,59 @@ }, { "subheads": [], - "description": "Sets the scene specific properties of a source. Unspecified properties will remain unchanged.", + "description": "Set settings of the specified source.", "param": [ - "{String (optional)} `scene-name` the name of the scene that the source item belongs to. Defaults to the current scene.", - "{String} `item` The name of the source.", - "{int} `position.x` The new x position of the source.", - "{int} `position.y` The new y position of the source.", - "{int} `position.alignment` The new alignment of the source.", - "{double} `rotation` The new clockwise rotation of the item in degrees.", - "{double} `scale.x` The new x scale of the item.", - "{double} `scale.y` The new y scale of the item.", - "{int} `crop.top` The new amount of pixels cropped off the top of the source before scaling.", - "{int} `crop.bottom` The new amount of pixels cropped off the bottom of the source before scaling.", - "{int} `crop.left` The new amount of pixels cropped off the left of the source before scaling.", - "{int} `crop.right` The new amount of pixels cropped off the right of the source before scaling.", - "{bool} `visible` The new visibility of the source. 'true' shows source, 'false' hides source.", - "{String} `bounds.type` The new bounds type of the source.", - "{int} `bounds.alignment` The new alignment of the bounding box. (0-2, 4-6, 8-10)", - "{double} `bounds.x` The new width of the bounding box.", - "{double} `bounds.y` The new height of the bounding box." + "{String} `sourceName` Name of the source item.", + "{String (optional)} `sourceType` Type of the specified source. Useful for type-checking to avoid settings a set of settings incompatible with the actual source's type.", + "{Object} `sourceSettings` Source settings. Varying between source types." + ], + "return": [ + "{String} `sourceName` Source name", + "{String} `sourceType` Type of the specified source", + "{Object} `sourceSettings` Source settings. Varying between source types." ], "api": "requests", - "name": "SetSceneItemProperties", + "name": "SetSourceSettings", "category": "sources", "since": "unreleased", + "returns": [ + { + "type": "String", + "name": "sourceName", + "description": "Source name" + }, + { + "type": "String", + "name": "sourceType", + "description": "Type of the specified source" + }, + { + "type": "Object", + "name": "sourceSettings", + "description": "Source settings. Varying between source types." + } + ], "params": [ + { + "type": "String", + "name": "sourceName", + "description": "Name of the source item." + }, { "type": "String (optional)", - "name": "scene-name", - "description": "the name of the scene that the source item belongs to. Defaults to the current scene." + "name": "sourceType", + "description": "Type of the specified source. Useful for type-checking to avoid settings a set of settings incompatible with the actual source's type." }, { - "type": "String", - "name": "item", - "description": "The name of the source." - }, - { - "type": "int", - "name": "position.x", - "description": "The new x position of the source." - }, - { - "type": "int", - "name": "position.y", - "description": "The new y position of the source." - }, - { - "type": "int", - "name": "position.alignment", - "description": "The new alignment of the source." - }, - { - "type": "double", - "name": "rotation", - "description": "The new clockwise rotation of the item in degrees." - }, - { - "type": "double", - "name": "scale.x", - "description": "The new x scale of the item." - }, - { - "type": "double", - "name": "scale.y", - "description": "The new y scale of the item." - }, - { - "type": "int", - "name": "crop.top", - "description": "The new amount of pixels cropped off the top of the source before scaling." - }, - { - "type": "int", - "name": "crop.bottom", - "description": "The new amount of pixels cropped off the bottom of the source before scaling." - }, - { - "type": "int", - "name": "crop.left", - "description": "The new amount of pixels cropped off the left of the source before scaling." - }, - { - "type": "int", - "name": "crop.right", - "description": "The new amount of pixels cropped off the right of the source before scaling." - }, - { - "type": "bool", - "name": "visible", - "description": "The new visibility of the source. 'true' shows source, 'false' hides source." - }, - { - "type": "String", - "name": "bounds.type", - "description": "The new bounds type of the source." - }, - { - "type": "int", - "name": "bounds.alignment", - "description": "The new alignment of the bounding box. (0-2, 4-6, 8-10)" - }, - { - "type": "double", - "name": "bounds.x", - "description": "The new width of the bounding box." - }, - { - "type": "double", - "name": "bounds.y", - "description": "The new height of the bounding box." + "type": "Object", + "name": "sourceSettings", + "description": "Source settings. Varying between source types." } ], "names": [ { "name": "", - "description": "SetSceneItemProperties" + "description": "SetSourceSettings" } ], "categories": [ @@ -3114,7 +3545,7 @@ ], "heading": { "level": 2, - "text": "SetSceneItemProperties" + "text": "SetSourceSettings" }, "lead": "", "type": "class", @@ -3756,379 +4187,6 @@ "type": "class", "examples": [] }, - { - "subheads": [], - "description": "Reset a source item.", - "param": [ - "{String (optional)} `scene-name` Name of the scene the source belogns to. Defaults to the current scene.", - "{String} `item` Name of the source item." - ], - "api": "requests", - "name": "ResetSceneItem", - "category": "sources", - "since": "4.2.0", - "params": [ - { - "type": "String (optional)", - "name": "scene-name", - "description": "Name of the scene the source belogns to. Defaults to the current scene." - }, - { - "type": "String", - "name": "item", - "description": "Name of the source item." - } - ], - "names": [ - { - "name": "", - "description": "ResetSceneItem" - } - ], - "categories": [ - { - "name": "", - "description": "sources" - } - ], - "sinces": [ - { - "name": "", - "description": "4.2.0" - } - ], - "heading": { - "level": 2, - "text": "ResetSceneItem" - }, - "lead": "", - "type": "class", - "examples": [] - }, - { - "subheads": [], - "description": "List all sources available in the running OBS instance", - "return": [ - "{Array of Objects} `sources` Array of sources as objects", - "{String} `sources.*.name` Unique source name", - "{String} `sources.*.typeId` Non-unique source internal type (a.k.a type id)", - "{String} `sources.*.type` Source type. Value is one of the following: \"input\", \"filter\", \"transition\", \"scene\" or \"unknown\"" - ], - "api": "requests", - "name": "GetSourcesList", - "category": "sources", - "since": "unreleased", - "returns": [ - { - "type": "Array of Objects", - "name": "sources", - "description": "Array of sources as objects" - }, - { - "type": "String", - "name": "sources.*.name", - "description": "Unique source name" - }, - { - "type": "String", - "name": "sources.*.typeId", - "description": "Non-unique source internal type (a.k.a type id)" - }, - { - "type": "String", - "name": "sources.*.type", - "description": "Source type. Value is one of the following: \"input\", \"filter\", \"transition\", \"scene\" or \"unknown\"" - } - ], - "names": [ - { - "name": "", - "description": "GetSourcesList" - } - ], - "categories": [ - { - "name": "", - "description": "sources" - } - ], - "sinces": [ - { - "name": "", - "description": "unreleased" - } - ], - "heading": { - "level": 2, - "text": "GetSourcesList" - }, - "lead": "", - "type": "class", - "examples": [] - }, - { - "subheads": [], - "description": "Get a list of all available sources types", - "return": [ - "{Array of Objects} `ids` Array of sources as objects", - "{String} `ids.*.typeId` Non-unique internal source type ID", - "{String} `ids.*.displayName` Display name of the source type", - "{String} `ids.*.type` Type. Value is one of the following: \"input\", \"filter\", \"transition\" or \"other\"", - "{Object} `ids.*.defaultSettings` Default settings of this source type", - "{Object} `ids.*.caps` Source type capabilities", - "{Boolean} `ids.*.caps.isAsync` True if source of this type provide frames asynchronously", - "{Boolean} `ids.*.caps.hasVideo` True if sources of this type provide video", - "{Boolean} `ids.*.caps.hasAudio` True if sources of this type provide audio", - "{Boolean} `ids.*.caps.canInteract` True if interaction with this sources of this type is possible", - "{Boolean} `ids.*.caps.isComposite` True if sources of this type composite one or more sub-sources", - "{Boolean} `ids.*.caps.doNotDuplicate` True if sources of this type should not be fully duplicated", - "{Boolean} `ids.*.caps.doNotSelfMonitor` True if sources of this type may cause a feedback loop if it's audio is monitored and shouldn't be" - ], - "api": "requests", - "name": "GetSourcesTypesList", - "category": "sources", - "since": "unreleased", - "returns": [ - { - "type": "Array of Objects", - "name": "ids", - "description": "Array of sources as objects" - }, - { - "type": "String", - "name": "ids.*.typeId", - "description": "Non-unique internal source type ID" - }, - { - "type": "String", - "name": "ids.*.displayName", - "description": "Display name of the source type" - }, - { - "type": "String", - "name": "ids.*.type", - "description": "Type. Value is one of the following: \"input\", \"filter\", \"transition\" or \"other\"" - }, - { - "type": "Object", - "name": "ids.*.defaultSettings", - "description": "Default settings of this source type" - }, - { - "type": "Object", - "name": "ids.*.caps", - "description": "Source type capabilities" - }, - { - "type": "Boolean", - "name": "ids.*.caps.isAsync", - "description": "True if source of this type provide frames asynchronously" - }, - { - "type": "Boolean", - "name": "ids.*.caps.hasVideo", - "description": "True if sources of this type provide video" - }, - { - "type": "Boolean", - "name": "ids.*.caps.hasAudio", - "description": "True if sources of this type provide audio" - }, - { - "type": "Boolean", - "name": "ids.*.caps.canInteract", - "description": "True if interaction with this sources of this type is possible" - }, - { - "type": "Boolean", - "name": "ids.*.caps.isComposite", - "description": "True if sources of this type composite one or more sub-sources" - }, - { - "type": "Boolean", - "name": "ids.*.caps.doNotDuplicate", - "description": "True if sources of this type should not be fully duplicated" - }, - { - "type": "Boolean", - "name": "ids.*.caps.doNotSelfMonitor", - "description": "True if sources of this type may cause a feedback loop if it's audio is monitored and shouldn't be" - } - ], - "names": [ - { - "name": "", - "description": "GetSourcesTypesList" - } - ], - "categories": [ - { - "name": "", - "description": "sources" - } - ], - "sinces": [ - { - "name": "", - "description": "unreleased" - } - ], - "heading": { - "level": 2, - "text": "GetSourcesTypesList" - }, - "lead": "", - "type": "class", - "examples": [] - }, - { - "subheads": [], - "description": "Get settings of the specified source", - "param": [ - "{String} `sourceName` Name of the source item.", - "{String (optional)} `sourceType` Type of the specified source. Useful for type-checking if you expect a specific settings schema." - ], - "return": [ - "{String} `sourceName` Source name", - "{String} `sourceType` Type of the specified source", - "{Object} `sourceSettings` Source settings. Varying between source types." - ], - "api": "requests", - "name": "GetSourceSettings", - "category": "sources", - "since": "unreleased", - "returns": [ - { - "type": "String", - "name": "sourceName", - "description": "Source name" - }, - { - "type": "String", - "name": "sourceType", - "description": "Type of the specified source" - }, - { - "type": "Object", - "name": "sourceSettings", - "description": "Source settings. Varying between source types." - } - ], - "params": [ - { - "type": "String", - "name": "sourceName", - "description": "Name of the source item." - }, - { - "type": "String (optional)", - "name": "sourceType", - "description": "Type of the specified source. Useful for type-checking if you expect a specific settings schema." - } - ], - "names": [ - { - "name": "", - "description": "GetSourceSettings" - } - ], - "categories": [ - { - "name": "", - "description": "sources" - } - ], - "sinces": [ - { - "name": "", - "description": "unreleased" - } - ], - "heading": { - "level": 2, - "text": "GetSourceSettings" - }, - "lead": "", - "type": "class", - "examples": [] - }, - { - "subheads": [], - "description": "Set settings of the specified source.", - "param": [ - "{String} `sourceName` Name of the source item.", - "{String (optional)} `sourceType` Type of the specified source. Useful for type-checking to avoid settings a set of settings incompatible with the actual source's type.", - "{Object} `sourceSettings` Source settings. Varying between source types." - ], - "return": [ - "{String} `sourceName` Source name", - "{String} `sourceType` Type of the specified source", - "{Object} `sourceSettings` Source settings. Varying between source types." - ], - "api": "requests", - "name": "SetSourceSettings", - "category": "sources", - "since": "unreleased", - "returns": [ - { - "type": "String", - "name": "sourceName", - "description": "Source name" - }, - { - "type": "String", - "name": "sourceType", - "description": "Type of the specified source" - }, - { - "type": "Object", - "name": "sourceSettings", - "description": "Source settings. Varying between source types." - } - ], - "params": [ - { - "type": "String", - "name": "sourceName", - "description": "Name of the source item." - }, - { - "type": "String (optional)", - "name": "sourceType", - "description": "Type of the specified source. Useful for type-checking to avoid settings a set of settings incompatible with the actual source's type." - }, - { - "type": "Object", - "name": "sourceSettings", - "description": "Source settings. Varying between source types." - } - ], - "names": [ - { - "name": "", - "description": "SetSourceSettings" - } - ], - "categories": [ - { - "name": "", - "description": "sources" - } - ], - "sinces": [ - { - "name": "", - "description": "unreleased" - } - ], - "heading": { - "level": 2, - "text": "SetSourceSettings" - }, - "lead": "", - "type": "class", - "examples": [] - }, { "subheads": [], "description": "Get configured special sources like Desktop Audio and Mic/Aux sources.", diff --git a/docs/generated/protocol.md b/docs/generated/protocol.md index edb0a031..9ec1b9c5 100644 --- a/docs/generated/protocol.md +++ b/docs/generated/protocol.md @@ -114,33 +114,35 @@ auth_response = base64_encode(auth_response_hash) * [Scene Collections](#scene-collections) + [SetCurrentSceneCollection](#setcurrentscenecollection) + [GetCurrentSceneCollection](#getcurrentscenecollection) + + [ListSceneCollections](#listscenecollections) + * [Scene Items](#scene-items) + + [GetSceneItemProperties](#getsceneitemproperties) + + [SetSceneItemProperties](#setsceneitemproperties) + + [ResetSceneItem](#resetsceneitem) + + [SetSceneItemRender](#setsceneitemrender) + + [SetSceneItemPosition](#setsceneitemposition) + + [SetSceneItemTransform](#setsceneitemtransform) + + [SetSceneItemCrop](#setsceneitemcrop) * [Scenes](#scenes-1) + [SetCurrentScene](#setcurrentscene) + [GetCurrentScene](#getcurrentscene) + [GetSceneList](#getscenelist) * [Sources](#sources-1) - + [SetSourceRender](#setsourcerender) - + [SetVolume](#setvolume) + + [GetSourcesList](#getsourceslist) + + [GetSourcesTypesList](#getsourcestypeslist) + [GetVolume](#getvolume) - + [ToggleMute](#togglemute) - + [SetMute](#setmute) + + [SetVolume](#setvolume) + [GetMute](#getmute) + + [SetMute](#setmute) + + [ToggleMute](#togglemute) + [SetSyncOffset](#setsyncoffset) + [GetSyncOffset](#getsyncoffset) - + [SetSceneItemPosition](#setsceneitemposition) - + [SetSceneItemTransform](#setsceneitemtransform) - + [SetSceneItemCrop](#setsceneitemcrop) - + [GetSceneItemProperties](#getsceneitemproperties) - + [SetSceneItemProperties](#setsceneitemproperties) + + [GetSourceSettings](#getsourcesettings) + + [SetSourceSettings](#setsourcesettings) + [GetTextGDIPlusProperties](#gettextgdiplusproperties) + [SetTextGDIPlusProperties](#settextgdiplusproperties) + [GetBrowserSourceProperties](#getbrowsersourceproperties) + [SetBrowserSourceProperties](#setbrowsersourceproperties) - + [ResetSceneItem](#resetsceneitem) - + [GetSourcesList](#getsourceslist) - + [GetSourcesTypesList](#getsourcestypeslist) - + [GetSourceSettings](#getsourcesettings) - + [SetSourceSettings](#setsourcesettings) + [GetSpecialSources](#getspecialsources) * [Streaming](#streaming-1) + [GetStreamingStatus](#getstreamingstatus) @@ -709,7 +711,7 @@ _No specified parameters._ | `version` | _double_ | OBSRemote compatible API version. Fixed to 1.1 for retrocompatibility. | | `obs-websocket-version` | _String_ | obs-websocket plugin version. | | `obs-studio-version` | _String_ | OBS Studio program version. | -| `available-requests` | _String\|Array_ | List of available request types. | +| `available-requests` | _String_ | List of available request types, formatted as a comma-separated list string (e.g. : "Method1,Method2,Method3"). | --- @@ -760,7 +762,7 @@ _No additional response items._ ### SetHeartbeat -- Added in v +- Unreleased Enable/disable sending of the Heartbeat event @@ -997,7 +999,7 @@ _No additional response items._ - Added in v4.2.0 -Save and flush the contents of the Replay Buffer to disk. This is +Flush and save the contents of the Replay Buffer to disk. This is basically the same as triggering the "Save Replay Buffer" hotkey. Will return an `error` if the Replay Buffer is not active. @@ -1053,20 +1055,96 @@ _No specified parameters._ --- -## Scenes - -### SetCurrentScene +### ListSceneCollections -- Added in v0.3 +- Added in v4.0.0 -Switch to the specified scene. +List available scene collections + +**Request Fields:** + +_No specified parameters._ + +**Response Items:** + +| Name | Type | Description | +| ---- | :---: | ------------| +| `scene-collections` | _Object\|Array_ | Scene collections list | +| `scene-collections.*.` | _String_ | | + + +--- + +## Scene Items + +### GetSceneItemProperties + + +- Unreleased + +Gets the scene specific properties of the specified source item. **Request Fields:** | Name | Type | Description | | ---- | :---: | ------------| -| `scene-name` | _String_ | Name of the scene to switch to. | +| `scene-name` | _String (optional)_ | the name of the scene that the source item belongs to. Defaults to the current scene. | +| `item` | _String_ | The name of the source. | + + +**Response Items:** + +| Name | Type | Description | +| ---- | :---: | ------------| +| `name` | _String_ | The name of the source. | +| `position.x` | _int_ | The x position of the source from the left. | +| `position.y` | _int_ | The y position of the source from the top. | +| `position.alignment` | _int_ | The point on the source that the item is manipulated from. | +| `rotation` | _double_ | The clockwise rotation of the item in degrees around the point of alignment. | +| `scale.x` | _double_ | The x-scale factor of the source. | +| `scale.y` | _double_ | The y-scale factor of the source. | +| `crop.top` | _int_ | The number of pixels cropped off the top of the source before scaling. | +| `crop.right` | _int_ | The number of pixels cropped off the right of the source before scaling. | +| `crop.bottom` | _int_ | The number of pixels cropped off the bottom of the source before scaling. | +| `crop.left` | _int_ | The number of pixels cropped off the left of the source before scaling. | +| `visible` | _bool_ | If the source is visible. | +| `bounds.type` | _String_ | Type of bounding box. | +| `bounds.alignment` | _int_ | Alignment of the bounding box. | +| `bounds.x` | _double_ | Width of the bounding box. | +| `bounds.y` | _double_ | Height of the bounding box. | + + +--- + +### SetSceneItemProperties + + +- Unreleased + +Sets the scene specific properties of a source. Unspecified properties will remain unchanged. + +**Request Fields:** + +| Name | Type | Description | +| ---- | :---: | ------------| +| `scene-name` | _String (optional)_ | the name of the scene that the source item belongs to. Defaults to the current scene. | +| `item` | _String_ | The name of the source. | +| `position.x` | _int_ | The new x position of the source. | +| `position.y` | _int_ | The new y position of the source. | +| `position.alignment` | _int_ | The new alignment of the source. | +| `rotation` | _double_ | The new clockwise rotation of the item in degrees. | +| `scale.x` | _double_ | The new x scale of the item. | +| `scale.y` | _double_ | The new y scale of the item. | +| `crop.top` | _int_ | The new amount of pixels cropped off the top of the source before scaling. | +| `crop.bottom` | _int_ | The new amount of pixels cropped off the bottom of the source before scaling. | +| `crop.left` | _int_ | The new amount of pixels cropped off the left of the source before scaling. | +| `crop.right` | _int_ | The new amount of pixels cropped off the right of the source before scaling. | +| `visible` | _bool_ | The new visibility of the source. 'true' shows source, 'false' hides source. | +| `bounds.type` | _String_ | The new bounds type of the source. | +| `bounds.alignment` | _int_ | The new alignment of the bounding box. (0-2, 4-6, 8-10) | +| `bounds.x` | _double_ | The new width of the bounding box. | +| `bounds.y` | _double_ | The new height of the bounding box. | **Response Items:** @@ -1075,51 +1153,28 @@ _No additional response items._ --- -### GetCurrentScene +### ResetSceneItem -- Added in v0.3 +- Added in v4.2.0 -Get the current scene's name and source items. +Reset a scene item. **Request Fields:** -_No specified parameters._ +| Name | Type | Description | +| ---- | :---: | ------------| +| `scene-name` | _String (optional)_ | Name of the scene the source belogns to. Defaults to the current scene. | +| `item` | _String_ | Name of the source item. | + **Response Items:** -| Name | Type | Description | -| ---- | :---: | ------------| -| `name` | _String_ | Name of the currently active scene. | -| `sources` | _Source\|Array_ | Ordered list of the current scene's source items. | - +_No additional response items._ --- -### GetSceneList - - -- Added in v0.3 - -Get a list of scenes in the currently active profile. - -**Request Fields:** - -_No specified parameters._ - -**Response Items:** - -| Name | Type | Description | -| ---- | :---: | ------------| -| `current-scene` | _String_ | Name of the currently active scene. | -| `scenes` | _Scene\|Array_ | Ordered list of the current profile's scenes (See `[GetCurrentScene](#getcurrentscene)` for more information). | - - ---- - -## Sources - -### SetSourceRender +### SetSceneItemRender - **⚠️ Deprecated. Since unreleased. Prefer the use of SetSceneItemProperties. ⚠️** @@ -1131,8 +1186,8 @@ Show or hide a specified source item in a specified scene. | Name | Type | Description | | ---- | :---: | ------------| -| `source` | _String_ | Name of the source in the specified scene. | -| `render` | _boolean_ | Desired visibility. | +| `source` | _String_ | Scene item name in the specified scene. | +| `render` | _boolean_ | true = shown ; false = hidden | | `scene-name` | _String (optional)_ | Name of the scene where the source resides. Defaults to the currently active scene. | @@ -1140,162 +1195,6 @@ Show or hide a specified source item in a specified scene. _No additional response items._ ---- - -### SetVolume - - -- Added in v4.0.0 - -Set the volume of the specified source. - -**Request Fields:** - -| Name | Type | Description | -| ---- | :---: | ------------| -| `source` | _String_ | Name of the source. | -| `volume` | _double_ | Desired volume. Must be between `0.0` and `1.0`. | - - -**Response Items:** - -_No additional response items._ - ---- - -### GetVolume - - -- Added in v4.0.0 - -Get the volume of the specified source. - -**Request Fields:** - -| Name | Type | Description | -| ---- | :---: | ------------| -| `source` | _String_ | Name of the source. | - - -**Response Items:** - -| Name | Type | Description | -| ---- | :---: | ------------| -| `name` | _String_ | Name of the source. | -| `volume` | _double_ | Volume of the source. Between `0.0` and `1.0`. | -| `mute` | _boolean_ | Indicates whether the source is muted. | - - ---- - -### ToggleMute - - -- Added in v4.0.0 - -Inverts the mute status of a specified source. - -**Request Fields:** - -| Name | Type | Description | -| ---- | :---: | ------------| -| `source` | _String_ | The name of the source. | - - -**Response Items:** - -_No additional response items._ - ---- - -### SetMute - - -- Added in v4.0.0 - -Sets the mute status of a specified source. - -**Request Fields:** - -| Name | Type | Description | -| ---- | :---: | ------------| -| `source` | _String_ | The name of the source. | -| `mute` | _boolean_ | Desired mute status. | - - -**Response Items:** - -_No additional response items._ - ---- - -### GetMute - - -- Added in v4.0.0 - -Get the mute status of a specified source. - -**Request Fields:** - -| Name | Type | Description | -| ---- | :---: | ------------| -| `source` | _String_ | The name of the source. | - - -**Response Items:** - -| Name | Type | Description | -| ---- | :---: | ------------| -| `name` | _String_ | The name of the source. | -| `muted` | _boolean_ | Mute status of the source. | - - ---- - -### SetSyncOffset - - -- Added in v4.2.0 - -Set the audio sync offset of a specified source. - -**Request Fields:** - -| Name | Type | Description | -| ---- | :---: | ------------| -| `source` | _String_ | The name of the source. | -| `offset` | _int_ | The desired audio sync offset (in nanoseconds). | - - -**Response Items:** - -_No additional response items._ - ---- - -### GetSyncOffset - - -- Added in v4.2.0 - -Get the audio sync offset of a specified source. - -**Request Fields:** - -| Name | Type | Description | -| ---- | :---: | ------------| -| `source` | _String_ | The name of the source. | - - -**Response Items:** - -| Name | Type | Description | -| ---- | :---: | ------------| -| `name` | _String_ | The name of the source. | -| `offset` | _int_ | The audio sync offset (in nanoseconds). | - - --- ### SetSceneItemPosition @@ -1373,19 +1272,185 @@ _No additional response items._ --- -### GetSceneItemProperties +## Scenes + +### SetCurrentScene -- Unreleased +- Added in v0.3 -Gets the scene specific properties of the specified source item. +Switch to the specified scene. **Request Fields:** | Name | Type | Description | | ---- | :---: | ------------| -| `scene-name` | _String (optional)_ | the name of the scene that the source item belongs to. Defaults to the current scene. | -| `item` | _String_ | The name of the source. | +| `scene-name` | _String_ | Name of the scene to switch to. | + + +**Response Items:** + +_No additional response items._ + +--- + +### GetCurrentScene + + +- Added in v0.3 + +Get the current scene's name and source items. + +**Request Fields:** + +_No specified parameters._ + +**Response Items:** + +| Name | Type | Description | +| ---- | :---: | ------------| +| `name` | _String_ | Name of the currently active scene. | +| `sources` | _Source\|Array_ | Ordered list of the current scene's source items. | + + +--- + +### GetSceneList + + +- Added in v0.3 + +Get a list of scenes in the currently active profile. + +**Request Fields:** + +_No specified parameters._ + +**Response Items:** + +| Name | Type | Description | +| ---- | :---: | ------------| +| `current-scene` | _String_ | Name of the currently active scene. | +| `scenes` | _Scene\|Array_ | Ordered list of the current profile's scenes (See `[GetCurrentScene](#getcurrentscene)` for more information). | + + +--- + +## Sources + +### GetSourcesList + + +- Unreleased + +List all sources available in the running OBS instance + +**Request Fields:** + +_No specified parameters._ + +**Response Items:** + +| Name | Type | Description | +| ---- | :---: | ------------| +| `sources` | _Array of Objects_ | Array of sources as objects | +| `sources.*.name` | _String_ | Unique source name | +| `sources.*.typeId` | _String_ | Non-unique source internal type (a.k.a type id) | +| `sources.*.type` | _String_ | Source type. Value is one of the following: "input", "filter", "transition", "scene" or "unknown" | + + +--- + +### GetSourcesTypesList + + +- Unreleased + +Get a list of all available sources types + +**Request Fields:** + +_No specified parameters._ + +**Response Items:** + +| Name | Type | Description | +| ---- | :---: | ------------| +| `ids` | _Array of Objects_ | Array of sources as objects | +| `ids.*.typeId` | _String_ | Non-unique internal source type ID | +| `ids.*.displayName` | _String_ | Display name of the source type | +| `ids.*.type` | _String_ | Type. Value is one of the following: "input", "filter", "transition" or "other" | +| `ids.*.defaultSettings` | _Object_ | Default settings of this source type | +| `ids.*.caps` | _Object_ | Source type capabilities | +| `ids.*.caps.isAsync` | _Boolean_ | True if source of this type provide frames asynchronously | +| `ids.*.caps.hasVideo` | _Boolean_ | True if sources of this type provide video | +| `ids.*.caps.hasAudio` | _Boolean_ | True if sources of this type provide audio | +| `ids.*.caps.canInteract` | _Boolean_ | True if interaction with this sources of this type is possible | +| `ids.*.caps.isComposite` | _Boolean_ | True if sources of this type composite one or more sub-sources | +| `ids.*.caps.doNotDuplicate` | _Boolean_ | True if sources of this type should not be fully duplicated | +| `ids.*.caps.doNotSelfMonitor` | _Boolean_ | True if sources of this type may cause a feedback loop if it's audio is monitored and shouldn't be | + + +--- + +### GetVolume + + +- Added in v4.0.0 + +Get the volume of the specified source. + +**Request Fields:** + +| Name | Type | Description | +| ---- | :---: | ------------| +| `source` | _String_ | Name of the source. | + + +**Response Items:** + +| Name | Type | Description | +| ---- | :---: | ------------| +| `name` | _String_ | Name of the source. | +| `volume` | _double_ | Volume of the source. Between `0.0` and `1.0`. | +| `mute` | _boolean_ | Indicates whether the source is muted. | + + +--- + +### SetVolume + + +- Added in v4.0.0 + +Set the volume of the specified source. + +**Request Fields:** + +| Name | Type | Description | +| ---- | :---: | ------------| +| `source` | _String_ | Name of the source. | +| `volume` | _double_ | Desired volume. Must be between `0.0` and `1.0`. | + + +**Response Items:** + +_No additional response items._ + +--- + +### GetMute + + +- Added in v4.0.0 + +Get the mute status of a specified source. + +**Request Fields:** + +| Name | Type | Description | +| ---- | :---: | ------------| +| `source` | _String_ | The name of the source. | **Response Items:** @@ -1393,59 +1458,148 @@ Gets the scene specific properties of the specified source item. | Name | Type | Description | | ---- | :---: | ------------| | `name` | _String_ | The name of the source. | -| `position.x` | _int_ | The x position of the source from the left. | -| `position.y` | _int_ | The y position of the source from the top. | -| `position.alignment` | _int_ | The point on the source that the item is manipulated from. | -| `rotation` | _double_ | The clockwise rotation of the item in degrees around the point of alignment. | -| `scale.x` | _double_ | The x-scale factor of the source. | -| `scale.y` | _double_ | The y-scale factor of the source. | -| `crop.top` | _int_ | The number of pixels cropped off the top of the source before scaling. | -| `crop.right` | _int_ | The number of pixels cropped off the right of the source before scaling. | -| `crop.bottom` | _int_ | The number of pixels cropped off the bottom of the source before scaling. | -| `crop.left` | _int_ | The number of pixels cropped off the left of the source before scaling. | -| `visible` | _bool_ | If the source is visible. | -| `bounds.type` | _String_ | Type of bounding box. | -| `bounds.alignment` | _int_ | Alignment of the bounding box. | -| `bounds.x` | _double_ | Width of the bounding box. | -| `bounds.y` | _double_ | Height of the bounding box. | +| `muted` | _boolean_ | Mute status of the source. | --- -### SetSceneItemProperties +### SetMute -- Unreleased +- Added in v4.0.0 -Sets the scene specific properties of a source. Unspecified properties will remain unchanged. +Sets the mute status of a specified source. **Request Fields:** | Name | Type | Description | | ---- | :---: | ------------| -| `scene-name` | _String (optional)_ | the name of the scene that the source item belongs to. Defaults to the current scene. | -| `item` | _String_ | The name of the source. | -| `position.x` | _int_ | The new x position of the source. | -| `position.y` | _int_ | The new y position of the source. | -| `position.alignment` | _int_ | The new alignment of the source. | -| `rotation` | _double_ | The new clockwise rotation of the item in degrees. | -| `scale.x` | _double_ | The new x scale of the item. | -| `scale.y` | _double_ | The new y scale of the item. | -| `crop.top` | _int_ | The new amount of pixels cropped off the top of the source before scaling. | -| `crop.bottom` | _int_ | The new amount of pixels cropped off the bottom of the source before scaling. | -| `crop.left` | _int_ | The new amount of pixels cropped off the left of the source before scaling. | -| `crop.right` | _int_ | The new amount of pixels cropped off the right of the source before scaling. | -| `visible` | _bool_ | The new visibility of the source. 'true' shows source, 'false' hides source. | -| `bounds.type` | _String_ | The new bounds type of the source. | -| `bounds.alignment` | _int_ | The new alignment of the bounding box. (0-2, 4-6, 8-10) | -| `bounds.x` | _double_ | The new width of the bounding box. | -| `bounds.y` | _double_ | The new height of the bounding box. | +| `source` | _String_ | The name of the source. | +| `mute` | _boolean_ | Desired mute status. | **Response Items:** _No additional response items._ +--- + +### ToggleMute + + +- Added in v4.0.0 + +Inverts the mute status of a specified source. + +**Request Fields:** + +| Name | Type | Description | +| ---- | :---: | ------------| +| `source` | _String_ | The name of the source. | + + +**Response Items:** + +_No additional response items._ + +--- + +### SetSyncOffset + + +- Added in v4.2.0 + +Set the audio sync offset of a specified source. + +**Request Fields:** + +| Name | Type | Description | +| ---- | :---: | ------------| +| `source` | _String_ | The name of the source. | +| `offset` | _int_ | The desired audio sync offset (in nanoseconds). | + + +**Response Items:** + +_No additional response items._ + +--- + +### GetSyncOffset + + +- Added in v4.2.0 + +Get the audio sync offset of a specified source. + +**Request Fields:** + +| Name | Type | Description | +| ---- | :---: | ------------| +| `source` | _String_ | The name of the source. | + + +**Response Items:** + +| Name | Type | Description | +| ---- | :---: | ------------| +| `name` | _String_ | The name of the source. | +| `offset` | _int_ | The audio sync offset (in nanoseconds). | + + +--- + +### GetSourceSettings + + +- Unreleased + +Get settings of the specified source + +**Request Fields:** + +| Name | Type | Description | +| ---- | :---: | ------------| +| `sourceName` | _String_ | Name of the source item. | +| `sourceType` | _String (optional)_ | Type of the specified source. Useful for type-checking if you expect a specific settings schema. | + + +**Response Items:** + +| Name | Type | Description | +| ---- | :---: | ------------| +| `sourceName` | _String_ | Source name | +| `sourceType` | _String_ | Type of the specified source | +| `sourceSettings` | _Object_ | Source settings. Varying between source types. | + + +--- + +### SetSourceSettings + + +- Unreleased + +Set settings of the specified source. + +**Request Fields:** + +| Name | Type | Description | +| ---- | :---: | ------------| +| `sourceName` | _String_ | Name of the source item. | +| `sourceType` | _String (optional)_ | Type of the specified source. Useful for type-checking to avoid settings a set of settings incompatible with the actual source's type. | +| `sourceSettings` | _Object_ | Source settings. Varying between source types. | + + +**Response Items:** + +| Name | Type | Description | +| ---- | :---: | ------------| +| `sourceName` | _String_ | Source name | +| `sourceType` | _String_ | Type of the specified source | +| `sourceSettings` | _Object_ | Source settings. Varying between source types. | + + --- ### GetTextGDIPlusProperties @@ -1606,135 +1760,6 @@ Set current properties for a Browser Source. _No additional response items._ ---- - -### ResetSceneItem - - -- Added in v4.2.0 - -Reset a source item. - -**Request Fields:** - -| Name | Type | Description | -| ---- | :---: | ------------| -| `scene-name` | _String (optional)_ | Name of the scene the source belogns to. Defaults to the current scene. | -| `item` | _String_ | Name of the source item. | - - -**Response Items:** - -_No additional response items._ - ---- - -### GetSourcesList - - -- Unreleased - -List all sources available in the running OBS instance - -**Request Fields:** - -_No specified parameters._ - -**Response Items:** - -| Name | Type | Description | -| ---- | :---: | ------------| -| `sources` | _Array of Objects_ | Array of sources as objects | -| `sources.*.name` | _String_ | Unique source name | -| `sources.*.typeId` | _String_ | Non-unique source internal type (a.k.a type id) | -| `sources.*.type` | _String_ | Source type. Value is one of the following: "input", "filter", "transition", "scene" or "unknown" | - - ---- - -### GetSourcesTypesList - - -- Unreleased - -Get a list of all available sources types - -**Request Fields:** - -_No specified parameters._ - -**Response Items:** - -| Name | Type | Description | -| ---- | :---: | ------------| -| `ids` | _Array of Objects_ | Array of sources as objects | -| `ids.*.typeId` | _String_ | Non-unique internal source type ID | -| `ids.*.displayName` | _String_ | Display name of the source type | -| `ids.*.type` | _String_ | Type. Value is one of the following: "input", "filter", "transition" or "other" | -| `ids.*.defaultSettings` | _Object_ | Default settings of this source type | -| `ids.*.caps` | _Object_ | Source type capabilities | -| `ids.*.caps.isAsync` | _Boolean_ | True if source of this type provide frames asynchronously | -| `ids.*.caps.hasVideo` | _Boolean_ | True if sources of this type provide video | -| `ids.*.caps.hasAudio` | _Boolean_ | True if sources of this type provide audio | -| `ids.*.caps.canInteract` | _Boolean_ | True if interaction with this sources of this type is possible | -| `ids.*.caps.isComposite` | _Boolean_ | True if sources of this type composite one or more sub-sources | -| `ids.*.caps.doNotDuplicate` | _Boolean_ | True if sources of this type should not be fully duplicated | -| `ids.*.caps.doNotSelfMonitor` | _Boolean_ | True if sources of this type may cause a feedback loop if it's audio is monitored and shouldn't be | - - ---- - -### GetSourceSettings - - -- Unreleased - -Get settings of the specified source - -**Request Fields:** - -| Name | Type | Description | -| ---- | :---: | ------------| -| `sourceName` | _String_ | Name of the source item. | -| `sourceType` | _String (optional)_ | Type of the specified source. Useful for type-checking if you expect a specific settings schema. | - - -**Response Items:** - -| Name | Type | Description | -| ---- | :---: | ------------| -| `sourceName` | _String_ | Source name | -| `sourceType` | _String_ | Type of the specified source | -| `sourceSettings` | _Object_ | Source settings. Varying between source types. | - - ---- - -### SetSourceSettings - - -- Unreleased - -Set settings of the specified source. - -**Request Fields:** - -| Name | Type | Description | -| ---- | :---: | ------------| -| `sourceName` | _String_ | Name of the source item. | -| `sourceType` | _String (optional)_ | Type of the specified source. Useful for type-checking to avoid settings a set of settings incompatible with the actual source's type. | -| `sourceSettings` | _Object_ | Source settings. Varying between source types. | - - -**Response Items:** - -| Name | Type | Description | -| ---- | :---: | ------------| -| `sourceName` | _String_ | Source name | -| `sourceType` | _String_ | Type of the specified source | -| `sourceSettings` | _Object_ | Source settings. Varying between source types. | - - --- ### GetSpecialSources