mediainputs

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 1 Imported by: 2

Documentation

Index

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 'media inputs' requests.

func NewClient added in v1.0.0

func NewClient(c *api.Client) *Client

NewMediaInputs returns a new 'media inputs' client.

func (*Client) GetMediaInputStatus

func (c *Client) GetMediaInputStatus(paramss ...*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"`

	// UUID of the media input
	InputUuid *string `json:"inputUuid,omitempty"`
}

Represents the request body for the GetMediaInputStatus request.

func NewGetMediaInputStatusParams added in v1.0.0

func NewGetMediaInputStatusParams() *GetMediaInputStatusParams

func (*GetMediaInputStatusParams) GetRequestName

func (o *GetMediaInputStatusParams) GetRequestName() string

Returns the associated request.

func (*GetMediaInputStatusParams) WithInputName added in v1.0.0

func (*GetMediaInputStatusParams) WithInputUuid added in v1.2.0

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"`
	// contains filtered or unexported fields
}

Represents the response body for the GetMediaInputStatus request.

type OffsetMediaInputCursorParams

type OffsetMediaInputCursorParams struct {
	// Name of the media input
	InputName *string `json:"inputName,omitempty"`

	// UUID of the media input
	InputUuid *string `json:"inputUuid,omitempty"`

	// Value to offset the current cursor position by
	MediaCursorOffset *float64 `json:"mediaCursorOffset,omitempty"`
}

Represents the request body for the OffsetMediaInputCursor request.

func NewOffsetMediaInputCursorParams added in v1.0.0

func NewOffsetMediaInputCursorParams() *OffsetMediaInputCursorParams

func (*OffsetMediaInputCursorParams) GetRequestName

func (o *OffsetMediaInputCursorParams) GetRequestName() string

Returns the associated request.

func (*OffsetMediaInputCursorParams) WithInputName added in v1.0.0

func (*OffsetMediaInputCursorParams) WithInputUuid added in v1.2.0

func (*OffsetMediaInputCursorParams) WithMediaCursorOffset added in v1.0.0

type OffsetMediaInputCursorResponse

type OffsetMediaInputCursorResponse struct {
	// contains filtered or unexported fields
}

Represents the response body for the OffsetMediaInputCursor request.

type SetMediaInputCursorParams

type SetMediaInputCursorParams struct {
	// Name of the media input
	InputName *string `json:"inputName,omitempty"`

	// UUID of the media input
	InputUuid *string `json:"inputUuid,omitempty"`

	// New cursor position to set
	MediaCursor *float64 `json:"mediaCursor,omitempty"`
}

Represents the request body for the SetMediaInputCursor request.

func NewSetMediaInputCursorParams added in v1.0.0

func NewSetMediaInputCursorParams() *SetMediaInputCursorParams

func (*SetMediaInputCursorParams) GetRequestName

func (o *SetMediaInputCursorParams) GetRequestName() string

Returns the associated request.

func (*SetMediaInputCursorParams) WithInputName added in v1.0.0

func (*SetMediaInputCursorParams) WithInputUuid added in v1.2.0

func (*SetMediaInputCursorParams) WithMediaCursor added in v1.0.0

type SetMediaInputCursorResponse

type SetMediaInputCursorResponse struct {
	// contains filtered or unexported fields
}

Represents the response body for the SetMediaInputCursor request.

type TriggerMediaInputActionParams

type TriggerMediaInputActionParams struct {
	// Name of the media input
	InputName *string `json:"inputName,omitempty"`

	// UUID of the media input
	InputUuid *string `json:"inputUuid,omitempty"`

	// Identifier of the `ObsMediaInputAction` enum
	MediaAction *string `json:"mediaAction,omitempty"`
}

Represents the request body for the TriggerMediaInputAction request.

func NewTriggerMediaInputActionParams added in v1.0.0

func NewTriggerMediaInputActionParams() *TriggerMediaInputActionParams

func (*TriggerMediaInputActionParams) GetRequestName

func (o *TriggerMediaInputActionParams) GetRequestName() string

Returns the associated request.

func (*TriggerMediaInputActionParams) WithInputName added in v1.0.0

func (*TriggerMediaInputActionParams) WithInputUuid added in v1.2.0

func (*TriggerMediaInputActionParams) WithMediaAction added in v1.0.0

type TriggerMediaInputActionResponse

type TriggerMediaInputActionResponse struct {
	// contains filtered or unexported fields
}

Represents the response body for the TriggerMediaInputAction request.

Jump to

Keyboard shortcuts

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