Documentation ¶
Index ¶
- type Client
- func (c *Client) GetSourceActive(params *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
- 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
- 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(params *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 { // Name of the source to get the active state of SourceName *string `json:"sourceName,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) WithSourceName ¶ added in v1.0.0
func (o *GetSourceActiveParams) WithSourceName(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 { // 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"` }
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) 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
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 { // 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"` }
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) 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
type SaveSourceScreenshotResponse ¶ added in v0.9.0
type SaveSourceScreenshotResponse struct { // Base64-encoded screenshot ImageData string `json:"imageData,omitempty"` // contains filtered or unexported fields }
Represents the response body for the SaveSourceScreenshot request.