Documentation ¶
Index ¶
- type Client
- func (c *Client) DeleteSceneItem(params *DeleteSceneItemParams) (*DeleteSceneItemResponse, error)
- func (c *Client) DuplicateSceneItem(params *DuplicateSceneItemParams) (*DuplicateSceneItemResponse, error)
- func (c *Client) GetSceneItemProperties(params *GetSceneItemPropertiesParams) (*GetSceneItemPropertiesResponse, error)
- func (c *Client) ResetSceneItem(params *ResetSceneItemParams) (*ResetSceneItemResponse, error)
- func (c *Client) SetSceneItemProperties(params *SetSceneItemPropertiesParams) (*SetSceneItemPropertiesResponse, error)
- type DeleteSceneItemParams
- type DeleteSceneItemResponse
- type DuplicateSceneItemParams
- type DuplicateSceneItemResponse
- type GetSceneItemPropertiesParams
- type GetSceneItemPropertiesResponse
- type ResetSceneItemParams
- type ResetSceneItemResponse
- type SetSceneItemPropertiesParams
- type SetSceneItemPropertiesResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client represents a client for 'scene items' requests
func (*Client) DeleteSceneItem ¶
func (c *Client) DeleteSceneItem(params *DeleteSceneItemParams) (*DeleteSceneItemResponse, error)
DeleteSceneItem sends the corresponding request to the connected OBS WebSockets server.
func (*Client) DuplicateSceneItem ¶
func (c *Client) DuplicateSceneItem( params *DuplicateSceneItemParams, ) (*DuplicateSceneItemResponse, error)
DuplicateSceneItem sends the corresponding request to the connected OBS WebSockets server.
func (*Client) GetSceneItemProperties ¶
func (c *Client) GetSceneItemProperties( params *GetSceneItemPropertiesParams, ) (*GetSceneItemPropertiesResponse, error)
GetSceneItemProperties sends the corresponding request to the connected OBS WebSockets server.
func (*Client) ResetSceneItem ¶
func (c *Client) ResetSceneItem(params *ResetSceneItemParams) (*ResetSceneItemResponse, error)
ResetSceneItem sends the corresponding request to the connected OBS WebSockets server.
func (*Client) SetSceneItemProperties ¶
func (c *Client) SetSceneItemProperties( params *SetSceneItemPropertiesParams, ) (*SetSceneItemPropertiesResponse, error)
SetSceneItemProperties sends the corresponding request to the connected OBS WebSockets server.
type DeleteSceneItemParams ¶
type DeleteSceneItemParams struct { requests.ParamsBasic Item struct { // Scene Item ID. Id int `json:"id"` // Scene Item name (prefer `id`, including both is acceptable). Name string `json:"name"` } `json:"item"` // Name of the scene the scene item belongs to. Defaults to the current scene. Scene string `json:"scene"` }
DeleteSceneItemParams represents the params body for the "DeleteSceneItem" request. Deletes a scene item.
Generated from https://github.com/Palakis/obs-websocket/blob/4.8.0/docs/generated/protocol.md#DeleteSceneItem.
func (*DeleteSceneItemParams) Name ¶
func (o *DeleteSceneItemParams) Name() string
Name just returns "DeleteSceneItem".
type DeleteSceneItemResponse ¶
type DeleteSceneItemResponse struct {
requests.ResponseBasic
}
DeleteSceneItemResponse represents the response body for the "DeleteSceneItem" request. Deletes a scene item.
Generated from https://github.com/Palakis/obs-websocket/blob/4.8.0/docs/generated/protocol.md#DeleteSceneItem.
type DuplicateSceneItemParams ¶
type DuplicateSceneItemParams struct { requests.ParamsBasic // Name of the scene to copy the item from. Defaults to the current scene. FromScene string `json:"fromScene"` Item struct { // Scene Item ID. Id int `json:"id"` // Scene Item name (prefer `id`, including both is acceptable). Name string `json:"name"` } `json:"item"` // Name of the scene to create the item in. Defaults to the current scene. ToScene string `json:"toScene"` }
DuplicateSceneItemParams represents the params body for the "DuplicateSceneItem" request. Duplicates a scene item.
Generated from https://github.com/Palakis/obs-websocket/blob/4.8.0/docs/generated/protocol.md#DuplicateSceneItem.
func (*DuplicateSceneItemParams) Name ¶
func (o *DuplicateSceneItemParams) Name() string
Name just returns "DuplicateSceneItem".
type DuplicateSceneItemResponse ¶
type DuplicateSceneItemResponse struct { requests.ResponseBasic Item struct { // New item ID Id int `json:"id"` // New item name Name string `json:"name"` } `json:"item"` // Name of the scene where the new item was created Scene string `json:"scene"` }
DuplicateSceneItemResponse represents the response body for the "DuplicateSceneItem" request. Duplicates a scene item.
Generated from https://github.com/Palakis/obs-websocket/blob/4.8.0/docs/generated/protocol.md#DuplicateSceneItem.
type GetSceneItemPropertiesParams ¶
type GetSceneItemPropertiesParams struct { requests.ParamsBasic Item struct { // Scene Item ID (if the `item` field is an object) Id int `json:"id"` // Scene Item name (if the `item` field is an object) Name string `json:"name"` } `json:"item"` // Name of the scene the scene item belongs to. Defaults to the current scene. SceneName string `json:"scene-name"` }
GetSceneItemPropertiesParams represents the params body for the "GetSceneItemProperties" request. Gets the scene specific properties of the specified source item. Coordinates are relative to the item's parent (the scene or group it belongs to).
Generated from https://github.com/Palakis/obs-websocket/blob/4.8.0/docs/generated/protocol.md#GetSceneItemProperties.
func (*GetSceneItemPropertiesParams) Name ¶
func (o *GetSceneItemPropertiesParams) Name() string
Name just returns "GetSceneItemProperties".
type GetSceneItemPropertiesResponse ¶
type GetSceneItemPropertiesResponse struct { requests.ResponseBasic // The point on the source that the item is manipulated from. The sum of 1=Left or 2=Right, and // 4=Top or 8=Bottom, or omit to center on that axis. Alignment int `json:"alignment"` Bounds struct { // Alignment of the bounding box. Alignment int `json:"alignment"` // Type of bounding box. Can be "OBS_BOUNDS_STRETCH", "OBS_BOUNDS_SCALE_INNER", // "OBS_BOUNDS_SCALE_OUTER", "OBS_BOUNDS_SCALE_TO_WIDTH", "OBS_BOUNDS_SCALE_TO_HEIGHT", // "OBS_BOUNDS_MAX_ONLY" or "OBS_BOUNDS_NONE". Type string `json:"type"` // Width of the bounding box. X float64 `json:"x"` // Height of the bounding box. Y float64 `json:"y"` } `json:"bounds"` Crop struct { // The number of pixels cropped off the bottom of the source before scaling. Bottom int `json:"bottom"` // The number of pixels cropped off the left of the source before scaling. Left int `json:"left"` // The number of pixels cropped off the right of the source before scaling. Right int `json:"right"` // The number of pixels cropped off the top of the source before scaling. Top int `json:"top"` } `json:"crop"` // List of children (if this item is a group) GroupChildren []typedefs.SceneItemTransform `json:"groupChildren"` // Scene item height (base source height multiplied by the vertical scaling factor) Height float64 `json:"height"` // Scene Item ID. ItemId int `json:"itemId"` // If the source's transform is locked. Locked bool `json:"locked"` // If the source is muted. Muted bool `json:"muted"` // Scene Item name. Name string `json:"name"` // Name of the item's parent (if this item belongs to a group) ParentGroupName string `json:"parentGroupName"` Position struct { // The point on the source that the item is manipulated from. Alignment float64 `json:"alignment"` // The x position of the source from the left. X float64 `json:"x"` // The y position of the source from the top. Y float64 `json:"y"` } `json:"position"` // The clockwise rotation of the item in degrees around the point of alignment. Rotation float64 `json:"rotation"` Scale struct { // The x-scale factor of the source. X float64 `json:"x"` // The y-scale factor of the source. Y float64 `json:"y"` } `json:"scale"` // Base source (without scaling) of the source SourceHeight int `json:"sourceHeight"` // Base width (without scaling) of the source SourceWidth int `json:"sourceWidth"` // If the source is visible. Visible bool `json:"visible"` // Scene item width (base source width multiplied by the horizontal scaling factor) Width float64 `json:"width"` }
GetSceneItemPropertiesResponse represents the response body for the "GetSceneItemProperties" request. Gets the scene specific properties of the specified source item. Coordinates are relative to the item's parent (the scene or group it belongs to).
Generated from https://github.com/Palakis/obs-websocket/blob/4.8.0/docs/generated/protocol.md#GetSceneItemProperties.
type ResetSceneItemParams ¶
type ResetSceneItemParams struct { requests.ParamsBasic Item struct { // Scene Item ID (if the `item` field is an object) Id int `json:"id"` // Scene Item name (if the `item` field is an object) Name string `json:"name"` } `json:"item"` // Name of the scene the scene item belongs to. Defaults to the current scene. SceneName string `json:"scene-name"` }
ResetSceneItemParams represents the params body for the "ResetSceneItem" request. Reset a scene item.
Generated from https://github.com/Palakis/obs-websocket/blob/4.8.0/docs/generated/protocol.md#ResetSceneItem.
func (*ResetSceneItemParams) Name ¶
func (o *ResetSceneItemParams) Name() string
Name just returns "ResetSceneItem".
type ResetSceneItemResponse ¶
type ResetSceneItemResponse struct {
requests.ResponseBasic
}
ResetSceneItemResponse represents the response body for the "ResetSceneItem" request. Reset a scene item.
Generated from https://github.com/Palakis/obs-websocket/blob/4.8.0/docs/generated/protocol.md#ResetSceneItem.
type SetSceneItemPropertiesParams ¶
type SetSceneItemPropertiesParams struct { requests.ParamsBasic Bounds struct { // The new alignment of the bounding box. (0-2, 4-6, 8-10) Alignment int `json:"alignment"` // The new bounds type of the source. Can be "OBS_BOUNDS_STRETCH", "OBS_BOUNDS_SCALE_INNER", // "OBS_BOUNDS_SCALE_OUTER", "OBS_BOUNDS_SCALE_TO_WIDTH", "OBS_BOUNDS_SCALE_TO_HEIGHT", // "OBS_BOUNDS_MAX_ONLY" or "OBS_BOUNDS_NONE". Type string `json:"type"` // The new width of the bounding box. X float64 `json:"x"` // The new height of the bounding box. Y float64 `json:"y"` } `json:"bounds"` Crop struct { // The new amount of pixels cropped off the bottom of the source before scaling. Bottom int `json:"bottom"` // The new amount of pixels cropped off the left of the source before scaling. Left int `json:"left"` // The new amount of pixels cropped off the right of the source before scaling. Right int `json:"right"` // The new amount of pixels cropped off the top of the source before scaling. Top int `json:"top"` } `json:"crop"` Item struct { // Scene Item ID (if the `item` field is an object) Id int `json:"id"` // Scene Item name (if the `item` field is an object) Name string `json:"name"` } `json:"item"` // The new locked status of the source. 'true' keeps it in its current position, 'false' allows // movement. Locked bool `json:"locked"` Position struct { // The new alignment of the source. Alignment float64 `json:"alignment"` // The new x position of the source. X float64 `json:"x"` // The new y position of the source. Y float64 `json:"y"` } `json:"position"` // The new clockwise rotation of the item in degrees. Rotation float64 `json:"rotation"` Scale struct { // The new x scale of the item. X float64 `json:"x"` // The new y scale of the item. Y float64 `json:"y"` } `json:"scale"` // Name of the scene the source item belongs to. Defaults to the current scene. SceneName string `json:"scene-name"` // The new visibility of the source. 'true' shows source, 'false' hides source. Visible bool `json:"visible"` }
SetSceneItemPropertiesParams represents the params body for the "SetSceneItemProperties" request. Sets the scene specific properties of a source. Unspecified properties will remain unchanged. Coordinates are relative to the item's parent (the scene or group it belongs to).
Generated from https://github.com/Palakis/obs-websocket/blob/4.8.0/docs/generated/protocol.md#SetSceneItemProperties.
func (*SetSceneItemPropertiesParams) Name ¶
func (o *SetSceneItemPropertiesParams) Name() string
Name just returns "SetSceneItemProperties".
type SetSceneItemPropertiesResponse ¶
type SetSceneItemPropertiesResponse struct {
requests.ResponseBasic
}
SetSceneItemPropertiesResponse represents the response body for the "SetSceneItemProperties" request. Sets the scene specific properties of a source. Unspecified properties will remain unchanged. Coordinates are relative to the item's parent (the scene or group it belongs to).
Generated from https://github.com/Palakis/obs-websocket/blob/4.8.0/docs/generated/protocol.md#SetSceneItemProperties.