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) 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) 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 ¶
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 ¶
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 ¶
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 ¶
type GetSourceActiveParams struct { // 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 ¶
func NewGetSourceActiveParams() *GetSourceActiveParams
func (*GetSourceActiveParams) GetRequestName ¶
func (o *GetSourceActiveParams) GetRequestName() string
Returns the associated request.
func (*GetSourceActiveParams) WithSourceName ¶
func (o *GetSourceActiveParams) WithSourceName(x string) *GetSourceActiveParams
func (*GetSourceActiveParams) WithSourceUuid ¶
func (o *GetSourceActiveParams) WithSourceUuid(x string) *GetSourceActiveParams
type GetSourceActiveResponse ¶
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 ¶
type GetSourceScreenshotParams struct { // 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 ¶
func NewGetSourceScreenshotParams() *GetSourceScreenshotParams
func (*GetSourceScreenshotParams) GetRequestName ¶
func (o *GetSourceScreenshotParams) GetRequestName() string
Returns the associated request.
func (*GetSourceScreenshotParams) WithImageCompressionQuality ¶
func (o *GetSourceScreenshotParams) WithImageCompressionQuality(x float64) *GetSourceScreenshotParams
func (*GetSourceScreenshotParams) WithImageFormat ¶
func (o *GetSourceScreenshotParams) WithImageFormat(x string) *GetSourceScreenshotParams
func (*GetSourceScreenshotParams) WithImageHeight ¶
func (o *GetSourceScreenshotParams) WithImageHeight(x float64) *GetSourceScreenshotParams
func (*GetSourceScreenshotParams) WithImageWidth ¶
func (o *GetSourceScreenshotParams) WithImageWidth(x float64) *GetSourceScreenshotParams
func (*GetSourceScreenshotParams) WithSourceName ¶
func (o *GetSourceScreenshotParams) WithSourceName(x string) *GetSourceScreenshotParams
func (*GetSourceScreenshotParams) WithSourceUuid ¶
func (o *GetSourceScreenshotParams) WithSourceUuid(x string) *GetSourceScreenshotParams
type GetSourceScreenshotResponse ¶
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 ¶
type SaveSourceScreenshotParams struct { // 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 ¶
func NewSaveSourceScreenshotParams() *SaveSourceScreenshotParams
func (*SaveSourceScreenshotParams) GetRequestName ¶
func (o *SaveSourceScreenshotParams) GetRequestName() string
Returns the associated request.
func (*SaveSourceScreenshotParams) WithImageCompressionQuality ¶
func (o *SaveSourceScreenshotParams) WithImageCompressionQuality(x float64) *SaveSourceScreenshotParams
func (*SaveSourceScreenshotParams) WithImageFilePath ¶
func (o *SaveSourceScreenshotParams) WithImageFilePath(x string) *SaveSourceScreenshotParams
func (*SaveSourceScreenshotParams) WithImageFormat ¶
func (o *SaveSourceScreenshotParams) WithImageFormat(x string) *SaveSourceScreenshotParams
func (*SaveSourceScreenshotParams) WithImageHeight ¶
func (o *SaveSourceScreenshotParams) WithImageHeight(x float64) *SaveSourceScreenshotParams
func (*SaveSourceScreenshotParams) WithImageWidth ¶
func (o *SaveSourceScreenshotParams) WithImageWidth(x float64) *SaveSourceScreenshotParams
func (*SaveSourceScreenshotParams) WithSourceName ¶
func (o *SaveSourceScreenshotParams) WithSourceName(x string) *SaveSourceScreenshotParams
func (*SaveSourceScreenshotParams) WithSourceUuid ¶
func (o *SaveSourceScreenshotParams) WithSourceUuid(x string) *SaveSourceScreenshotParams
type SaveSourceScreenshotResponse ¶
type SaveSourceScreenshotResponse struct {
// contains filtered or unexported fields
}
Represents the response body for the SaveSourceScreenshot request.