Documentation
¶
Index ¶
- type Client
- func (c *Client) GetSourceActive(paramss ...*GetSourceActiveParams) (*GetSourceActiveResponse, error)
- func (c *Client) GetSourceScreenshot(params *GetSourceScreenshotParams) (*GetSourceScreenshotResponse, error)
- func (c *Client) SaveSourceScreenshot(params *SaveSourceScreenshotParams) (*SaveSourceScreenshotResponse, error)
- type GetSourceActiveParams
- type GetSourceActiveResponse
- type GetSourceScreenshotParams
- func (o *GetSourceScreenshotParams) GetRequestName() string
- func (o *GetSourceScreenshotParams) WithCanvasUuid(x string) *GetSourceScreenshotParams
- func (o *GetSourceScreenshotParams) WithImageCompressionQuality(x float64) *GetSourceScreenshotParams
- func (o *GetSourceScreenshotParams) WithImageFormat(x string) *GetSourceScreenshotParams
- func (o *GetSourceScreenshotParams) WithImageHeight(x float64) *GetSourceScreenshotParams
- func (o *GetSourceScreenshotParams) WithImageWidth(x float64) *GetSourceScreenshotParams
- func (o *GetSourceScreenshotParams) WithSourceName(x string) *GetSourceScreenshotParams
- func (o *GetSourceScreenshotParams) WithSourceUuid(x string) *GetSourceScreenshotParams
- type GetSourceScreenshotResponse
- type SaveSourceScreenshotParams
- func (o *SaveSourceScreenshotParams) GetRequestName() string
- func (o *SaveSourceScreenshotParams) WithCanvasUuid(x string) *SaveSourceScreenshotParams
- func (o *SaveSourceScreenshotParams) WithImageCompressionQuality(x float64) *SaveSourceScreenshotParams
- func (o *SaveSourceScreenshotParams) WithImageFilePath(x string) *SaveSourceScreenshotParams
- func (o *SaveSourceScreenshotParams) WithImageFormat(x string) *SaveSourceScreenshotParams
- func (o *SaveSourceScreenshotParams) WithImageHeight(x float64) *SaveSourceScreenshotParams
- func (o *SaveSourceScreenshotParams) WithImageWidth(x float64) *SaveSourceScreenshotParams
- func (o *SaveSourceScreenshotParams) WithSourceName(x string) *SaveSourceScreenshotParams
- func (o *SaveSourceScreenshotParams) WithSourceUuid(x string) *SaveSourceScreenshotParams
- type SaveSourceScreenshotResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a client for 'sources' requests.
func (*Client) GetSourceActive ¶ added in v0.5.0
func (c *Client) GetSourceActive(paramss ...*GetSourceActiveParams) (*GetSourceActiveResponse, error)
Gets the active and show state of a source.
**Compatible with inputs and scenes.**
func (*Client) GetSourceScreenshot ¶ added in v0.9.0
func (c *Client) GetSourceScreenshot(params *GetSourceScreenshotParams) (*GetSourceScreenshotResponse, error)
Gets a Base64-encoded screenshot of a source.
The `imageWidth` and `imageHeight` parameters are treated as "scale to inner", meaning the smallest ratio will be used and the aspect ratio of the original resolution is kept. If `imageWidth` and `imageHeight` are not specified, the compressed image will use the full resolution of the source.
**Compatible with inputs and scenes.**
func (*Client) SaveSourceScreenshot ¶ added in v0.9.0
func (c *Client) SaveSourceScreenshot(params *SaveSourceScreenshotParams) (*SaveSourceScreenshotResponse, error)
Saves a screenshot of a source to the filesystem.
The `imageWidth` and `imageHeight` parameters are treated as "scale to inner", meaning the smallest ratio will be used and the aspect ratio of the original resolution is kept. If `imageWidth` and `imageHeight` are not specified, the compressed image will use the full resolution of the source.
**Compatible with inputs and scenes.**
type GetSourceActiveParams ¶ added in v0.5.0
type GetSourceActiveParams struct {
// UUID of the canvas the source is in, if using sourceName field
CanvasUuid *string `json:"canvasUuid,omitempty"`
// Name of the source to get the active state of
SourceName *string `json:"sourceName,omitempty"`
// UUID of the source to get the active state of
SourceUuid *string `json:"sourceUuid,omitempty"`
}
Represents the request body for the GetSourceActive request.
func NewGetSourceActiveParams ¶ added in v1.0.0
func NewGetSourceActiveParams() *GetSourceActiveParams
func (*GetSourceActiveParams) GetRequestName ¶ added in v0.9.0
func (o *GetSourceActiveParams) GetRequestName() string
Returns the associated request.
func (*GetSourceActiveParams) WithCanvasUuid ¶ added in v1.8.0
func (o *GetSourceActiveParams) WithCanvasUuid(x string) *GetSourceActiveParams
func (*GetSourceActiveParams) WithSourceName ¶ added in v1.0.0
func (o *GetSourceActiveParams) WithSourceName(x string) *GetSourceActiveParams
func (*GetSourceActiveParams) WithSourceUuid ¶ added in v1.2.0
func (o *GetSourceActiveParams) WithSourceUuid(x string) *GetSourceActiveParams
type GetSourceActiveResponse ¶ added in v0.5.0
type GetSourceActiveResponse struct {
// Whether the source is showing in Program
VideoActive bool `json:"videoActive,omitempty"`
// Whether the source is showing in the UI (Preview, Projector, Properties)
VideoShowing bool `json:"videoShowing,omitempty"`
// contains filtered or unexported fields
}
Represents the response body for the GetSourceActive request.
type GetSourceScreenshotParams ¶ added in v0.9.0
type GetSourceScreenshotParams struct {
// UUID of the canvas the source is in, if using sourceName field
CanvasUuid *string `json:"canvasUuid,omitempty"`
// Compression quality to use. 0 for high compression, 100 for uncompressed. -1 to use "default" (whatever that
// means, idk)
ImageCompressionQuality *float64 `json:"imageCompressionQuality,omitempty"`
// Image compression format to use. Use `GetVersion` to get compatible image formats
ImageFormat *string `json:"imageFormat,omitempty"`
// Height to scale the screenshot to
ImageHeight *float64 `json:"imageHeight,omitempty"`
// Width to scale the screenshot to
ImageWidth *float64 `json:"imageWidth,omitempty"`
// Name of the source to take a screenshot of
SourceName *string `json:"sourceName,omitempty"`
// UUID of the source to take a screenshot of
SourceUuid *string `json:"sourceUuid,omitempty"`
}
Represents the request body for the GetSourceScreenshot request.
func NewGetSourceScreenshotParams ¶ added in v1.0.0
func NewGetSourceScreenshotParams() *GetSourceScreenshotParams
func (*GetSourceScreenshotParams) GetRequestName ¶ added in v0.9.0
func (o *GetSourceScreenshotParams) GetRequestName() string
Returns the associated request.
func (*GetSourceScreenshotParams) WithCanvasUuid ¶ added in v1.8.0
func (o *GetSourceScreenshotParams) WithCanvasUuid(x string) *GetSourceScreenshotParams
func (*GetSourceScreenshotParams) WithImageCompressionQuality ¶ added in v1.0.0
func (o *GetSourceScreenshotParams) WithImageCompressionQuality(x float64) *GetSourceScreenshotParams
func (*GetSourceScreenshotParams) WithImageFormat ¶ added in v1.0.0
func (o *GetSourceScreenshotParams) WithImageFormat(x string) *GetSourceScreenshotParams
func (*GetSourceScreenshotParams) WithImageHeight ¶ added in v1.0.0
func (o *GetSourceScreenshotParams) WithImageHeight(x float64) *GetSourceScreenshotParams
func (*GetSourceScreenshotParams) WithImageWidth ¶ added in v1.0.0
func (o *GetSourceScreenshotParams) WithImageWidth(x float64) *GetSourceScreenshotParams
func (*GetSourceScreenshotParams) WithSourceName ¶ added in v1.0.0
func (o *GetSourceScreenshotParams) WithSourceName(x string) *GetSourceScreenshotParams
func (*GetSourceScreenshotParams) WithSourceUuid ¶ added in v1.2.0
func (o *GetSourceScreenshotParams) WithSourceUuid(x string) *GetSourceScreenshotParams
type GetSourceScreenshotResponse ¶ added in v0.9.0
type GetSourceScreenshotResponse struct {
// Base64-encoded screenshot
ImageData string `json:"imageData,omitempty"`
// contains filtered or unexported fields
}
Represents the response body for the GetSourceScreenshot request.
type SaveSourceScreenshotParams ¶ added in v0.9.0
type SaveSourceScreenshotParams struct {
// UUID of the canvas the source is in, if using sourceName field
CanvasUuid *string `json:"canvasUuid,omitempty"`
// Compression quality to use. 0 for high compression, 100 for uncompressed. -1 to use "default" (whatever that
// means, idk)
ImageCompressionQuality *float64 `json:"imageCompressionQuality,omitempty"`
// Path to save the screenshot file to. Eg. `C:\Users\user\Desktop\screenshot.png`
ImageFilePath *string `json:"imageFilePath,omitempty"`
// Image compression format to use. Use `GetVersion` to get compatible image formats
ImageFormat *string `json:"imageFormat,omitempty"`
// Height to scale the screenshot to
ImageHeight *float64 `json:"imageHeight,omitempty"`
// Width to scale the screenshot to
ImageWidth *float64 `json:"imageWidth,omitempty"`
// Name of the source to take a screenshot of
SourceName *string `json:"sourceName,omitempty"`
// UUID of the source to take a screenshot of
SourceUuid *string `json:"sourceUuid,omitempty"`
}
Represents the request body for the SaveSourceScreenshot request.
func NewSaveSourceScreenshotParams ¶ added in v1.0.0
func NewSaveSourceScreenshotParams() *SaveSourceScreenshotParams
func (*SaveSourceScreenshotParams) GetRequestName ¶ added in v0.9.0
func (o *SaveSourceScreenshotParams) GetRequestName() string
Returns the associated request.
func (*SaveSourceScreenshotParams) WithCanvasUuid ¶ added in v1.8.0
func (o *SaveSourceScreenshotParams) WithCanvasUuid(x string) *SaveSourceScreenshotParams
func (*SaveSourceScreenshotParams) WithImageCompressionQuality ¶ added in v1.0.0
func (o *SaveSourceScreenshotParams) WithImageCompressionQuality(x float64) *SaveSourceScreenshotParams
func (*SaveSourceScreenshotParams) WithImageFilePath ¶ added in v1.0.0
func (o *SaveSourceScreenshotParams) WithImageFilePath(x string) *SaveSourceScreenshotParams
func (*SaveSourceScreenshotParams) WithImageFormat ¶ added in v1.0.0
func (o *SaveSourceScreenshotParams) WithImageFormat(x string) *SaveSourceScreenshotParams
func (*SaveSourceScreenshotParams) WithImageHeight ¶ added in v1.0.0
func (o *SaveSourceScreenshotParams) WithImageHeight(x float64) *SaveSourceScreenshotParams
func (*SaveSourceScreenshotParams) WithImageWidth ¶ added in v1.0.0
func (o *SaveSourceScreenshotParams) WithImageWidth(x float64) *SaveSourceScreenshotParams
func (*SaveSourceScreenshotParams) WithSourceName ¶ added in v1.0.0
func (o *SaveSourceScreenshotParams) WithSourceName(x string) *SaveSourceScreenshotParams
func (*SaveSourceScreenshotParams) WithSourceUuid ¶ added in v1.2.0
func (o *SaveSourceScreenshotParams) WithSourceUuid(x string) *SaveSourceScreenshotParams
type SaveSourceScreenshotResponse ¶ added in v0.9.0
type SaveSourceScreenshotResponse struct {
// contains filtered or unexported fields
}
Represents the response body for the SaveSourceScreenshot request.