sceneitems

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddSceneItemParams added in v0.5.0

type AddSceneItemParams struct {
	requests.ParamsBasic

	// Name of the scene to create the scene item in
	SceneName string `json:"sceneName,omitempty"`

	// Whether to make the sceneitem visible on creation or not. Default `true`
	SetVisible *bool `json:"setVisible,omitempty"`

	// Name of the source to be added
	SourceName string `json:"sourceName,omitempty"`
}

AddSceneItemParams represents the params body for the "AddSceneItem" request. Creates a scene item in a scene. In other words, this is how you add a source into a scene. Since 4.9.0.

func (*AddSceneItemParams) GetSelfName added in v0.5.0

func (o *AddSceneItemParams) GetSelfName() string

GetSelfName just returns "AddSceneItem".

type AddSceneItemResponse added in v0.5.0

type AddSceneItemResponse struct {
	requests.ResponseBasic

	// Numerical ID of the created scene item
	ItemId int `json:"itemId,omitempty"`
}

AddSceneItemResponse represents the response body for the "AddSceneItem" request. Creates a scene item in a scene. In other words, this is how you add a source into a scene. Since v4.9.0.

type Client

type Client struct {
	*requests.Client
}

Client represents a client for 'scene items' requests.

func (*Client) AddSceneItem added in v0.5.0

func (c *Client) AddSceneItem(params *AddSceneItemParams) (*AddSceneItemResponse, error)

AddSceneItem sends the corresponding request to the connected OBS WebSockets server.

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) GetSceneItemList added in v0.5.0

func (c *Client) GetSceneItemList(params *GetSceneItemListParams) (*GetSceneItemListResponse, error)

GetSceneItemList 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.

func (*Client) SetSceneItemRender added in v0.5.0

func (c *Client) SetSceneItemRender(params *SetSceneItemRenderParams) (*SetSceneItemRenderResponse, error)

SetSceneItemRender sends the corresponding request to the connected OBS WebSockets server.

type DeleteSceneItemParams

type DeleteSceneItemParams struct {
	requests.ParamsBasic

	// The item specification for this object.
	Item *typedefs.Item `json:"item,omitempty"`

	// Name of the scene the scene item belongs to. Defaults to the current scene.
	Scene string `json:"scene,omitempty"`
}

DeleteSceneItemParams represents the params body for the "DeleteSceneItem" request. Deletes a scene item. Since 4.5.0.

func (*DeleteSceneItemParams) GetSelfName added in v0.5.0

func (o *DeleteSceneItemParams) GetSelfName() string

GetSelfName just returns "DeleteSceneItem".

type DeleteSceneItemResponse

type DeleteSceneItemResponse struct {
	requests.ResponseBasic
}

DeleteSceneItemResponse represents the response body for the "DeleteSceneItem" request. Deletes a scene item. Since v4.5.0.

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,omitempty"`

	// The item specification for this object.
	Item *typedefs.Item `json:"item,omitempty"`

	// Name of the scene to create the item in. Defaults to the current scene.
	ToScene string `json:"toScene,omitempty"`
}

DuplicateSceneItemParams represents the params body for the "DuplicateSceneItem" request. Duplicates a scene item. Since 4.5.0.

func (*DuplicateSceneItemParams) GetSelfName added in v0.5.0

func (o *DuplicateSceneItemParams) GetSelfName() string

GetSelfName just returns "DuplicateSceneItem".

type DuplicateSceneItemResponse

type DuplicateSceneItemResponse struct {
	requests.ResponseBasic

	// The item specification for this object.
	Item *typedefs.Item `json:"item,omitempty"`

	// Name of the scene where the new item was created
	Scene string `json:"scene,omitempty"`
}

DuplicateSceneItemResponse represents the response body for the "DuplicateSceneItem" request. Duplicates a scene item. Since v4.5.0.

type GetSceneItemListParams added in v0.5.0

type GetSceneItemListParams struct {
	requests.ParamsBasic

	// Name of the scene to get the list of scene items from. Defaults to the current scene if not specified.
	SceneName string `json:"sceneName,omitempty"`
}

GetSceneItemListParams represents the params body for the "GetSceneItemList" request. Get a list of all scene items in a scene. Since 4.9.0.

func (*GetSceneItemListParams) GetSelfName added in v0.5.0

func (o *GetSceneItemListParams) GetSelfName() string

GetSelfName just returns "GetSceneItemList".

type GetSceneItemListResponse added in v0.5.0

type GetSceneItemListResponse struct {
	requests.ResponseBasic

	SceneItems []*SceneItem `json:"sceneItems,omitempty"`

	// Name of the requested (or current) scene
	SceneName string `json:"sceneName,omitempty"`
}

GetSceneItemListResponse represents the response body for the "GetSceneItemList" request. Get a list of all scene items in a scene. Since v4.9.0.

type GetSceneItemPropertiesParams

type GetSceneItemPropertiesParams struct {
	requests.ParamsBasic

	// The item specification for this object.
	Item *typedefs.Item `json:"item,omitempty"`

	// Name of the scene the scene item belongs to. Defaults to the current scene.
	SceneName string `json:"scene-name,omitempty"`
}

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). Since 4.3.0.

func (*GetSceneItemPropertiesParams) GetSelfName added in v0.5.0

func (o *GetSceneItemPropertiesParams) GetSelfName() string

GetSelfName just returns "GetSceneItemProperties".

type GetSceneItemPropertiesResponse

type GetSceneItemPropertiesResponse struct {
	requests.ResponseBasic

	// The bounding box of the object (source, scene item, etc).
	Bounds *typedefs.Bounds `json:"bounds,omitempty"`

	// The crop specification for the object (source, scene item, etc).
	Crop *typedefs.Crop `json:"crop,omitempty"`

	// List of children (if this item is a group)
	GroupChildren []typedefs.SceneItemTransform `json:"groupChildren,omitempty"`

	// Scene item height (base source height multiplied by the vertical scaling factor)
	Height float64 `json:"height,omitempty"`

	// Scene Item ID.
	ItemId int `json:"itemId,omitempty"`

	// If the source's transform is locked.
	Locked bool `json:"locked,omitempty"`

	// If the source is muted.
	Muted bool `json:"muted,omitempty"`

	// Scene Item name.
	Name string `json:"name,omitempty"`

	// Name of the item's parent (if this item belongs to a group)
	ParentGroupName string `json:"parentGroupName,omitempty"`

	// The position of the object (source, scene item, etc).
	Position *typedefs.Position `json:"position,omitempty"`

	// The clockwise rotation of the item in degrees around the point of alignment.
	Rotation float64 `json:"rotation,omitempty"`

	// The scaling specification for the object (source, scene item, etc).
	Scale *typedefs.Scale `json:"scale,omitempty"`

	// Base source (without scaling) of the source
	SourceHeight int `json:"sourceHeight,omitempty"`

	// Base width (without scaling) of the source
	SourceWidth int `json:"sourceWidth,omitempty"`

	// If the source is visible.
	Visible bool `json:"visible,omitempty"`

	// Scene item width (base source width multiplied by the horizontal scaling factor)
	Width float64 `json:"width,omitempty"`
}

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). Since v4.3.0.

type ResetSceneItemParams

type ResetSceneItemParams struct {
	requests.ParamsBasic

	// The item specification for this object.
	Item *typedefs.Item `json:"item,omitempty"`

	// Name of the scene the scene item belongs to. Defaults to the current scene.
	SceneName string `json:"scene-name,omitempty"`
}

ResetSceneItemParams represents the params body for the "ResetSceneItem" request. Reset a scene item. Since 4.2.0.

func (*ResetSceneItemParams) GetSelfName added in v0.5.0

func (o *ResetSceneItemParams) GetSelfName() string

GetSelfName just returns "ResetSceneItem".

type ResetSceneItemResponse

type ResetSceneItemResponse struct {
	requests.ResponseBasic
}

ResetSceneItemResponse represents the response body for the "ResetSceneItem" request. Reset a scene item. Since v4.2.0.

type SceneItem added in v0.6.0

type SceneItem struct {
	// Unique item id of the source item
	ItemId int `json:"itemId,omitempty"`

	// ID if the scene item's source. For example `vlc_source` or `image_source`
	SourceKind string `json:"sourceKind,omitempty"`

	// Name of the scene item's source
	SourceName string `json:"sourceName,omitempty"`

	// Type of the scene item's source. Either `input`, `group`, or `scene`
	SourceType string `json:"sourceType,omitempty"`
}

type SetSceneItemPropertiesParams

type SetSceneItemPropertiesParams struct {
	requests.ParamsBasic

	// The bounding box of the object (source, scene item, etc).
	Bounds *typedefs.Bounds `json:"bounds,omitempty"`

	// The crop specification for the object (source, scene item, etc).
	Crop *typedefs.Crop `json:"crop,omitempty"`

	// The item specification for this object.
	Item *typedefs.Item `json:"item,omitempty"`

	// The new locked status of the source. 'true' keeps it in its current position, 'false' allows movement.
	Locked *bool `json:"locked,omitempty"`

	// The position of the object (source, scene item, etc).
	Position *typedefs.Position `json:"position,omitempty"`

	// The new clockwise rotation of the item in degrees.
	Rotation float64 `json:"rotation,omitempty"`

	// The scaling specification for the object (source, scene item, etc).
	Scale *typedefs.Scale `json:"scale,omitempty"`

	// Name of the scene the source item belongs to. Defaults to the current scene.
	SceneName string `json:"scene-name,omitempty"`

	// The new visibility of the source. 'true' shows source, 'false' hides source.
	Visible *bool `json:"visible,omitempty"`
}

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). Since 4.3.0.

func (*SetSceneItemPropertiesParams) GetSelfName added in v0.5.0

func (o *SetSceneItemPropertiesParams) GetSelfName() string

GetSelfName 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). Since v4.3.0.

type SetSceneItemRenderParams added in v0.5.0

type SetSceneItemRenderParams struct {
	requests.ParamsBasic

	// Scene Item id
	Item int `json:"item,omitempty"`

	// true = shown ; false = hidden
	Render *bool `json:"render,omitempty"`

	// Name of the scene the scene item belongs to. Defaults to the currently active scene.
	SceneName string `json:"scene-name,omitempty"`

	// Scene Item name.
	Source string `json:"source,omitempty"`
}

SetSceneItemRenderParams represents the params body for the "SetSceneItemRender" request. Show or hide a specified source item in a specified scene. Since 0.3.

func (*SetSceneItemRenderParams) GetSelfName added in v0.5.0

func (o *SetSceneItemRenderParams) GetSelfName() string

GetSelfName just returns "SetSceneItemRender".

type SetSceneItemRenderResponse added in v0.5.0

type SetSceneItemRenderResponse struct {
	requests.ResponseBasic
}

SetSceneItemRenderResponse represents the response body for the "SetSceneItemRender" request. Show or hide a specified source item in a specified scene. Since v0.3.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL