Documentation
¶
Index ¶
- type Client
- func (c *Client) GetMediaInputStatus(params *GetMediaInputStatusParams) (*GetMediaInputStatusResponse, error)
- func (c *Client) OffsetMediaInputCursor(params *OffsetMediaInputCursorParams) (*OffsetMediaInputCursorResponse, error)
- func (c *Client) SetMediaInputCursor(params *SetMediaInputCursorParams) (*SetMediaInputCursorResponse, error)
- func (c *Client) TriggerMediaInputAction(params *TriggerMediaInputActionParams) (*TriggerMediaInputActionResponse, error)
- type GetMediaInputStatusParams
- type GetMediaInputStatusResponse
- type OffsetMediaInputCursorParams
- type OffsetMediaInputCursorResponse
- type SetMediaInputCursorParams
- type SetMediaInputCursorResponse
- type TriggerMediaInputActionParams
- type TriggerMediaInputActionResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client represents a client for 'media inputs' requests.
func (*Client) GetMediaInputStatus ¶
func (c *Client) GetMediaInputStatus(params *GetMediaInputStatusParams) (*GetMediaInputStatusResponse, error)
Gets the status of a media input.
Media States:
- `OBS_MEDIA_STATE_NONE` - `OBS_MEDIA_STATE_PLAYING` - `OBS_MEDIA_STATE_OPENING` - `OBS_MEDIA_STATE_BUFFERING` - `OBS_MEDIA_STATE_PAUSED` - `OBS_MEDIA_STATE_STOPPED` - `OBS_MEDIA_STATE_ENDED` - `OBS_MEDIA_STATE_ERROR`
func (*Client) OffsetMediaInputCursor ¶
func (c *Client) OffsetMediaInputCursor(params *OffsetMediaInputCursorParams) (*OffsetMediaInputCursorResponse, error)
Offsets the current cursor position of a media input by the specified value.
This request does not perform bounds checking of the cursor position.
func (*Client) SetMediaInputCursor ¶
func (c *Client) SetMediaInputCursor(params *SetMediaInputCursorParams) (*SetMediaInputCursorResponse, error)
Sets the cursor position of a media input.
This request does not perform bounds checking of the cursor position.
func (*Client) TriggerMediaInputAction ¶
func (c *Client) TriggerMediaInputAction( params *TriggerMediaInputActionParams, ) (*TriggerMediaInputActionResponse, error)
Triggers an action on a media input.
type GetMediaInputStatusParams ¶
type GetMediaInputStatusParams struct {
// Name of the media input
InputName string `json:"inputName,omitempty"`
}
Represents the request body for the GetMediaInputStatus request.
func (*GetMediaInputStatusParams) GetRequestName ¶
func (o *GetMediaInputStatusParams) GetRequestName() string
Returns the associated request.
type GetMediaInputStatusResponse ¶
type GetMediaInputStatusResponse struct {
// Position of the cursor in milliseconds. `null` if not playing
MediaCursor float64 `json:"mediaCursor,omitempty"`
// Total duration of the playing media in milliseconds. `null` if not playing
MediaDuration float64 `json:"mediaDuration,omitempty"`
// State of the media input
MediaState string `json:"mediaState,omitempty"`
}
Represents the response body for the GetMediaInputStatus request.
type OffsetMediaInputCursorParams ¶
type OffsetMediaInputCursorParams struct {
// Name of the media input
InputName string `json:"inputName,omitempty"`
// Value to offset the current cursor position by
MediaCursorOffset float64 `json:"mediaCursorOffset,omitempty"`
}
Represents the request body for the OffsetMediaInputCursor request.
func (*OffsetMediaInputCursorParams) GetRequestName ¶
func (o *OffsetMediaInputCursorParams) GetRequestName() string
Returns the associated request.
type OffsetMediaInputCursorResponse ¶
type OffsetMediaInputCursorResponse struct{}
Represents the response body for the OffsetMediaInputCursor request.
type SetMediaInputCursorParams ¶
type SetMediaInputCursorParams struct {
// Name of the media input
InputName string `json:"inputName,omitempty"`
// New cursor position to set
MediaCursor float64 `json:"mediaCursor,omitempty"`
}
Represents the request body for the SetMediaInputCursor request.
func (*SetMediaInputCursorParams) GetRequestName ¶
func (o *SetMediaInputCursorParams) GetRequestName() string
Returns the associated request.
type SetMediaInputCursorResponse ¶
type SetMediaInputCursorResponse struct{}
Represents the response body for the SetMediaInputCursor request.
type TriggerMediaInputActionParams ¶
type TriggerMediaInputActionParams struct {
// Name of the media input
InputName string `json:"inputName,omitempty"`
// Identifier of the `ObsMediaInputAction` enum
MediaAction string `json:"mediaAction,omitempty"`
}
Represents the request body for the TriggerMediaInputAction request.
func (*TriggerMediaInputActionParams) GetRequestName ¶
func (o *TriggerMediaInputActionParams) GetRequestName() string
Returns the associated request.
type TriggerMediaInputActionResponse ¶
type TriggerMediaInputActionResponse struct{}
Represents the response body for the TriggerMediaInputAction request.