1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
// This file has been automatically generated. Don't edit it.
package streaming
import requests "github.com/andreykaipov/goobs/api/requests"
/*
GetStreamingStatusParams represents the params body for the "GetStreamingStatus" request.
Get current streaming and recording status.
Since 0.3.
*/
type GetStreamingStatusParams struct {
requests.ParamsBasic
}
// GetSelfName just returns "GetStreamingStatus".
func (o *GetStreamingStatusParams) GetSelfName() string {
return "GetStreamingStatus"
}
/*
GetStreamingStatusResponse represents the response body for the "GetStreamingStatus" request.
Get current streaming and recording status.
Since v0.3.
*/
type GetStreamingStatusResponse struct {
requests.ResponseBasic
// Always false. Retrocompatibility with OBSRemote.
PreviewOnly bool `json:"preview-only,omitempty"`
// Time elapsed since recording started (only present if currently recording).
RecTimecode string `json:"rec-timecode,omitempty"`
// Current recording status.
Recording bool `json:"recording,omitempty"`
// If recording is paused.
RecordingPaused bool `json:"recording-paused,omitempty"`
// Time elapsed since streaming started (only present if currently streaming).
StreamTimecode string `json:"stream-timecode,omitempty"`
// Current streaming status.
Streaming bool `json:"streaming,omitempty"`
// Current virtual cam status.
Virtualcam bool `json:"virtualcam,omitempty"`
// Time elapsed since virtual cam started (only present if virtual cam currently active).
VirtualcamTimecode string `json:"virtualcam-timecode,omitempty"`
}
// GetStreamingStatus sends the corresponding request to the connected OBS WebSockets server. Note the variadic
// arguments as this request doesn't require any parameters.
func (c *Client) GetStreamingStatus(paramss ...*GetStreamingStatusParams) (*GetStreamingStatusResponse, error) {
if len(paramss) == 0 {
paramss = []*GetStreamingStatusParams{{}}
}
params := paramss[0]
data := &GetStreamingStatusResponse{}
if err := c.SendRequest(params, data); err != nil {
return nil, err
}
return data, nil
}
|