mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
requests: add "id" to scene item data and fix docs
This commit is contained in:
parent
89fe6d57c9
commit
ea28d217e0
@ -115,11 +115,13 @@ obs_data_t* Utils::GetSceneItemData(obs_sceneitem_t* item) {
|
|||||||
|
|
||||||
obs_data_t* data = obs_data_create();
|
obs_data_t* data = obs_data_create();
|
||||||
obs_data_set_string(data, "name",
|
obs_data_set_string(data, "name",
|
||||||
obs_source_get_name(obs_sceneitem_get_source(item)));
|
obs_source_get_name(itemSource));
|
||||||
|
obs_data_set_int(data, "id",
|
||||||
|
obs_sceneitem_get_id(item));
|
||||||
obs_data_set_string(data, "type",
|
obs_data_set_string(data, "type",
|
||||||
obs_source_get_id(obs_sceneitem_get_source(item)));
|
obs_source_get_id(itemSource));
|
||||||
obs_data_set_double(data, "volume",
|
obs_data_set_double(data, "volume",
|
||||||
obs_source_get_volume(obs_sceneitem_get_source(item)));
|
obs_source_get_volume(itemSource));
|
||||||
obs_data_set_double(data, "x", pos.x);
|
obs_data_set_double(data, "x", pos.x);
|
||||||
obs_data_set_double(data, "y", pos.y);
|
obs_data_set_double(data, "y", pos.y);
|
||||||
obs_data_set_int(data, "source_cx", (int)item_width);
|
obs_data_set_int(data, "source_cx", (int)item_width);
|
||||||
|
@ -2,6 +2,22 @@
|
|||||||
|
|
||||||
#include "WSRequestHandler.h"
|
#include "WSRequestHandler.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef {Object} `Source` An OBS Scene Item.
|
||||||
|
* @property {Number} `cy`
|
||||||
|
* @property {Number} `cx`
|
||||||
|
* @property {String} `name` The name of this Scene Item.
|
||||||
|
* @property {int} `id` Scene item ID
|
||||||
|
* @property {Boolean} `render` Whether or not this Scene Item is set to "visible".
|
||||||
|
* @property {Boolean} `locked` Whether or not this Scene Item is locked and can't be moved around
|
||||||
|
* @property {Number} `source_cx`
|
||||||
|
* @property {Number} `source_cy`
|
||||||
|
* @property {String} `type` Source type. Value is one of the following: "input", "filter", "transition", "scene" or "unknown"
|
||||||
|
* @property {Number} `volume`
|
||||||
|
* @property {Number} `x`
|
||||||
|
* @property {Number} `y`
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the scene specific properties of the specified source item.
|
* Gets the scene specific properties of the specified source item.
|
||||||
*
|
*
|
||||||
|
@ -2,20 +2,6 @@
|
|||||||
|
|
||||||
#include "WSRequestHandler.h"
|
#include "WSRequestHandler.h"
|
||||||
|
|
||||||
/**
|
|
||||||
* @typedef {Object} `Source` An OBS Scene Item.
|
|
||||||
* @property {Number} `cy`
|
|
||||||
* @property {Number} `cx`
|
|
||||||
* @property {String} `name` The name of this Scene Item.
|
|
||||||
* @property {Boolean} `render` Whether or not this Scene Item is set to "visible".
|
|
||||||
* @property {Number} `source_cx`
|
|
||||||
* @property {Number} `source_cy`
|
|
||||||
* @property {String} `type` Source type. Value is one of the following: "input", "filter", "transition", "scene" or "unknown"
|
|
||||||
* @property {Number} `volume`
|
|
||||||
* @property {Number} `x`
|
|
||||||
* @property {Number} `y`
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List all sources available in the running OBS instance
|
* List all sources available in the running OBS instance
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user