Documentation ¶
Index ¶
- type Client
- func (c *Client) GetMediaDuration(params *GetMediaDurationParams) (*GetMediaDurationResponse, error)
- func (c *Client) GetMediaState(params *GetMediaStateParams) (*GetMediaStateResponse, error)
- func (c *Client) GetMediaTime(params *GetMediaTimeParams) (*GetMediaTimeResponse, error)
- func (c *Client) NextMedia(params *NextMediaParams) (*NextMediaResponse, error)
- func (c *Client) PlayPauseMedia(params *PlayPauseMediaParams) (*PlayPauseMediaResponse, error)
- func (c *Client) PreviousMedia(params *PreviousMediaParams) (*PreviousMediaResponse, error)
- func (c *Client) RestartMedia(params *RestartMediaParams) (*RestartMediaResponse, error)
- func (c *Client) ScrubMedia(params *ScrubMediaParams) (*ScrubMediaResponse, error)
- func (c *Client) SetMediaTime(params *SetMediaTimeParams) (*SetMediaTimeResponse, error)
- func (c *Client) StopMedia(params *StopMediaParams) (*StopMediaResponse, error)
- type GetMediaDurationParams
- type GetMediaDurationResponse
- type GetMediaStateParams
- type GetMediaStateResponse
- type GetMediaTimeParams
- type GetMediaTimeResponse
- type NextMediaParams
- type NextMediaResponse
- type PlayPauseMediaParams
- type PlayPauseMediaResponse
- type PreviousMediaParams
- type PreviousMediaResponse
- type RestartMediaParams
- type RestartMediaResponse
- type ScrubMediaParams
- type ScrubMediaResponse
- type SetMediaTimeParams
- type SetMediaTimeResponse
- type StopMediaParams
- type StopMediaResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client represents a client for 'media control' requests
func (*Client) GetMediaDuration ¶
func (c *Client) GetMediaDuration(params *GetMediaDurationParams) (*GetMediaDurationResponse, error)
GetMediaDuration sends the corresponding request to the connected OBS WebSockets server.
func (*Client) GetMediaState ¶
func (c *Client) GetMediaState(params *GetMediaStateParams) (*GetMediaStateResponse, error)
GetMediaState sends the corresponding request to the connected OBS WebSockets server.
func (*Client) GetMediaTime ¶
func (c *Client) GetMediaTime(params *GetMediaTimeParams) (*GetMediaTimeResponse, error)
GetMediaTime sends the corresponding request to the connected OBS WebSockets server.
func (*Client) NextMedia ¶
func (c *Client) NextMedia(params *NextMediaParams) (*NextMediaResponse, error)
NextMedia sends the corresponding request to the connected OBS WebSockets server.
func (*Client) PlayPauseMedia ¶
func (c *Client) PlayPauseMedia(params *PlayPauseMediaParams) (*PlayPauseMediaResponse, error)
PlayPauseMedia sends the corresponding request to the connected OBS WebSockets server.
func (*Client) PreviousMedia ¶
func (c *Client) PreviousMedia(params *PreviousMediaParams) (*PreviousMediaResponse, error)
PreviousMedia sends the corresponding request to the connected OBS WebSockets server.
func (*Client) RestartMedia ¶
func (c *Client) RestartMedia(params *RestartMediaParams) (*RestartMediaResponse, error)
RestartMedia sends the corresponding request to the connected OBS WebSockets server.
func (*Client) ScrubMedia ¶
func (c *Client) ScrubMedia(params *ScrubMediaParams) (*ScrubMediaResponse, error)
ScrubMedia sends the corresponding request to the connected OBS WebSockets server.
func (*Client) SetMediaTime ¶
func (c *Client) SetMediaTime(params *SetMediaTimeParams) (*SetMediaTimeResponse, error)
SetMediaTime sends the corresponding request to the connected OBS WebSockets server.
func (*Client) StopMedia ¶
func (c *Client) StopMedia(params *StopMediaParams) (*StopMediaResponse, error)
StopMedia sends the corresponding request to the connected OBS WebSockets server.
type GetMediaDurationParams ¶
type GetMediaDurationParams struct { requests.ParamsBasic // Source name. SourceName string `json:"sourceName"` }
GetMediaDurationParams represents the params body for the "GetMediaDuration" request. Get the length of media in milliseconds. Supports ffmpeg and vlc media sources (as of OBS v25.0.8) Note: For some reason, for the first 5 or so seconds that the media is playing, the total duration can be off by upwards of 50ms. Since 4.9.0.
func (*GetMediaDurationParams) GetSelfName ¶
func (o *GetMediaDurationParams) GetSelfName() string
GetSelfName just returns "GetMediaDuration".
type GetMediaDurationResponse ¶
type GetMediaDurationResponse struct { requests.ResponseBasic // The total length of media in milliseconds.. MediaDuration int `json:"mediaDuration"` }
GetMediaDurationResponse represents the response body for the "GetMediaDuration" request. Get the length of media in milliseconds. Supports ffmpeg and vlc media sources (as of OBS v25.0.8) Note: For some reason, for the first 5 or so seconds that the media is playing, the total duration can be off by upwards of 50ms. Since v4.9.0.
type GetMediaStateParams ¶
type GetMediaStateParams struct { requests.ParamsBasic // Source name. SourceName string `json:"sourceName"` }
GetMediaStateParams represents the params body for the "GetMediaState" request. Get the current playing state of a media source. Supports ffmpeg and vlc media sources (as of OBS v25.0.8) Since 4.9.0.
func (*GetMediaStateParams) GetSelfName ¶
func (o *GetMediaStateParams) GetSelfName() string
GetSelfName just returns "GetMediaState".
type GetMediaStateResponse ¶
type GetMediaStateResponse struct { requests.ResponseBasic // The media state of the provided source. States: `none`, `playing`, `opening`, `buffering`, `paused`, `stopped`, // `ended`, `error`, `unknown` MediaState string `json:"mediaState"` }
GetMediaStateResponse represents the response body for the "GetMediaState" request. Get the current playing state of a media source. Supports ffmpeg and vlc media sources (as of OBS v25.0.8) Since v4.9.0.
type GetMediaTimeParams ¶
type GetMediaTimeParams struct { requests.ParamsBasic // Source name. SourceName string `json:"sourceName"` }
GetMediaTimeParams represents the params body for the "GetMediaTime" request. Get the current timestamp of media in milliseconds. Supports ffmpeg and vlc media sources (as of OBS v25.0.8) Since 4.9.0.
func (*GetMediaTimeParams) GetSelfName ¶
func (o *GetMediaTimeParams) GetSelfName() string
GetSelfName just returns "GetMediaTime".
type GetMediaTimeResponse ¶
type GetMediaTimeResponse struct { requests.ResponseBasic // The time in milliseconds since the start of the media. Timestamp int `json:"timestamp"` }
GetMediaTimeResponse represents the response body for the "GetMediaTime" request. Get the current timestamp of media in milliseconds. Supports ffmpeg and vlc media sources (as of OBS v25.0.8) Since v4.9.0.
type NextMediaParams ¶
type NextMediaParams struct { requests.ParamsBasic // Source name. SourceName string `json:"sourceName"` }
NextMediaParams represents the params body for the "NextMedia" request. Skip to the next media item in the playlist. Supports only vlc media source (as of OBS v25.0.8) Since 4.9.0.
func (*NextMediaParams) GetSelfName ¶
func (o *NextMediaParams) GetSelfName() string
GetSelfName just returns "NextMedia".
type NextMediaResponse ¶
type NextMediaResponse struct {
requests.ResponseBasic
}
NextMediaResponse represents the response body for the "NextMedia" request. Skip to the next media item in the playlist. Supports only vlc media source (as of OBS v25.0.8) Since v4.9.0.
type PlayPauseMediaParams ¶
type PlayPauseMediaParams struct { requests.ParamsBasic // (optional) Whether to pause or play the source. `false` for play, `true` for pause. PlayPause bool `json:"playPause"` // Source name. SourceName string `json:"sourceName"` }
PlayPauseMediaParams represents the params body for the "PlayPauseMedia" request. Pause or play a media source. Supports ffmpeg and vlc media sources (as of OBS v25.0.8) Note :Leaving out `playPause` toggles the current pause state Since 4.9.0.
func (*PlayPauseMediaParams) GetSelfName ¶
func (o *PlayPauseMediaParams) GetSelfName() string
GetSelfName just returns "PlayPauseMedia".
type PlayPauseMediaResponse ¶
type PlayPauseMediaResponse struct {
requests.ResponseBasic
}
PlayPauseMediaResponse represents the response body for the "PlayPauseMedia" request. Pause or play a media source. Supports ffmpeg and vlc media sources (as of OBS v25.0.8) Note :Leaving out `playPause` toggles the current pause state Since v4.9.0.
type PreviousMediaParams ¶
type PreviousMediaParams struct { requests.ParamsBasic // Source name. SourceName string `json:"sourceName"` }
PreviousMediaParams represents the params body for the "PreviousMedia" request. Go to the previous media item in the playlist. Supports only vlc media source (as of OBS v25.0.8) Since 4.9.0.
func (*PreviousMediaParams) GetSelfName ¶
func (o *PreviousMediaParams) GetSelfName() string
GetSelfName just returns "PreviousMedia".
type PreviousMediaResponse ¶
type PreviousMediaResponse struct {
requests.ResponseBasic
}
PreviousMediaResponse represents the response body for the "PreviousMedia" request. Go to the previous media item in the playlist. Supports only vlc media source (as of OBS v25.0.8) Since v4.9.0.
type RestartMediaParams ¶
type RestartMediaParams struct { requests.ParamsBasic // Source name. SourceName string `json:"sourceName"` }
RestartMediaParams represents the params body for the "RestartMedia" request. Restart a media source. Supports ffmpeg and vlc media sources (as of OBS v25.0.8) Since 4.9.0.
func (*RestartMediaParams) GetSelfName ¶
func (o *RestartMediaParams) GetSelfName() string
GetSelfName just returns "RestartMedia".
type RestartMediaResponse ¶
type RestartMediaResponse struct {
requests.ResponseBasic
}
RestartMediaResponse represents the response body for the "RestartMedia" request. Restart a media source. Supports ffmpeg and vlc media sources (as of OBS v25.0.8) Since v4.9.0.
type ScrubMediaParams ¶
type ScrubMediaParams struct { requests.ParamsBasic // Source name. SourceName string `json:"sourceName"` // Millisecond offset (positive or negative) to offset the current media position. TimeOffset int `json:"timeOffset"` }
ScrubMediaParams represents the params body for the "ScrubMedia" request. Scrub media using a supplied offset. Supports ffmpeg and vlc media sources (as of OBS v25.0.8) Note: Due to processing/network delays, this request is not perfect. The processing rate of this request has also not been tested. Since 4.9.0.
func (*ScrubMediaParams) GetSelfName ¶
func (o *ScrubMediaParams) GetSelfName() string
GetSelfName just returns "ScrubMedia".
type ScrubMediaResponse ¶
type ScrubMediaResponse struct {
requests.ResponseBasic
}
ScrubMediaResponse represents the response body for the "ScrubMedia" request. Scrub media using a supplied offset. Supports ffmpeg and vlc media sources (as of OBS v25.0.8) Note: Due to processing/network delays, this request is not perfect. The processing rate of this request has also not been tested. Since v4.9.0.
type SetMediaTimeParams ¶
type SetMediaTimeParams struct { requests.ParamsBasic // Source name. SourceName string `json:"sourceName"` // Milliseconds to set the timestamp to. Timestamp int `json:"timestamp"` }
SetMediaTimeParams represents the params body for the "SetMediaTime" request. Set the timestamp of a media source. Supports ffmpeg and vlc media sources (as of OBS v25.0.8) Since 4.9.0.
func (*SetMediaTimeParams) GetSelfName ¶
func (o *SetMediaTimeParams) GetSelfName() string
GetSelfName just returns "SetMediaTime".
type SetMediaTimeResponse ¶
type SetMediaTimeResponse struct {
requests.ResponseBasic
}
SetMediaTimeResponse represents the response body for the "SetMediaTime" request. Set the timestamp of a media source. Supports ffmpeg and vlc media sources (as of OBS v25.0.8) Since v4.9.0.
type StopMediaParams ¶
type StopMediaParams struct { requests.ParamsBasic // Source name. SourceName string `json:"sourceName"` }
StopMediaParams represents the params body for the "StopMedia" request. Stop a media source. Supports ffmpeg and vlc media sources (as of OBS v25.0.8) Since 4.9.0.
func (*StopMediaParams) GetSelfName ¶
func (o *StopMediaParams) GetSelfName() string
GetSelfName just returns "StopMedia".
type StopMediaResponse ¶
type StopMediaResponse struct {
requests.ResponseBasic
}
StopMediaResponse represents the response body for the "StopMedia" request. Stop a media source. Supports ffmpeg and vlc media sources (as of OBS v25.0.8) Since v4.9.0.
Source Files ¶
- xx_generated.getmediaduration.go
- xx_generated.getmediastate.go
- xx_generated.getmediatime.go
- xx_generated.nextmedia.go
- xx_generated.playpausemedia.go
- xx_generated.previousmedia.go
- xx_generated.restartmedia.go
- xx_generated.scrubmedia.go
- xx_generated.setmediatime.go
- xx_generated.stopmedia.go
- zz_generated.client.go