streaming

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*requests.Client
}

Client represents a client for 'streaming' requests

func (*Client) GetStreamSettings

func (c *Client) GetStreamSettings(
	paramss ...*GetStreamSettingsParams,
) (*GetStreamSettingsResponse, error)

GetStreamSettings sends the corresponding request to the connected OBS WebSockets server. Note the variadic arguments as this request doesn't require any parameters.

func (*Client) GetStreamingStatus

func (c *Client) GetStreamingStatus(
	paramss ...*GetStreamingStatusParams,
) (*GetStreamingStatusResponse, error)

GetStreamingStatus sends the corresponding request to the connected OBS WebSockets server. Note the variadic arguments as this request doesn't require any parameters.

func (*Client) SaveStreamSettings

func (c *Client) SaveStreamSettings(
	paramss ...*SaveStreamSettingsParams,
) (*SaveStreamSettingsResponse, error)

SaveStreamSettings sends the corresponding request to the connected OBS WebSockets server. Note the variadic arguments as this request doesn't require any parameters.

func (*Client) SetStreamSettings

func (c *Client) SetStreamSettings(
	params *SetStreamSettingsParams,
) (*SetStreamSettingsResponse, error)

SetStreamSettings sends the corresponding request to the connected OBS WebSockets server.

func (*Client) StartStopStreaming

func (c *Client) StartStopStreaming(
	paramss ...*StartStopStreamingParams,
) (*StartStopStreamingResponse, error)

StartStopStreaming sends the corresponding request to the connected OBS WebSockets server. Note the variadic arguments as this request doesn't require any parameters.

func (*Client) StartStreaming

func (c *Client) StartStreaming(params *StartStreamingParams) (*StartStreamingResponse, error)

StartStreaming sends the corresponding request to the connected OBS WebSockets server.

func (*Client) StopStreaming

func (c *Client) StopStreaming(paramss ...*StopStreamingParams) (*StopStreamingResponse, error)

StopStreaming sends the corresponding request to the connected OBS WebSockets server. Note the variadic arguments as this request doesn't require any parameters.

type GetStreamSettingsParams

type GetStreamSettingsParams struct {
	requests.ParamsBasic
}

GetStreamSettingsParams represents the params body for the "GetStreamSettings" request. Get the current streaming server settings.

Generated from https://github.com/Palakis/obs-websocket/blob/4.5.1/docs/generated/protocol.md#GetStreamSettings.

func (*GetStreamSettingsParams) Name

func (o *GetStreamSettingsParams) Name() string

Name just returns "GetStreamSettings".

type GetStreamSettingsResponse

type GetStreamSettingsResponse struct {
	requests.ResponseBasic

	Settings struct {
		// The publish key of the stream.
		Key string `json:"key"`

		// The password to use when accessing the streaming server. Only present if `use-auth` is
		// `true`.
		Password string `json:"password"`

		// The publish URL.
		Server string `json:"server"`

		// Indicates whether authentication should be used when connecting to the streaming server.
		UseAuth bool `json:"use-auth"`

		// The username to use when accessing the streaming server. Only present if `use-auth` is
		// `true`.
		Username string `json:"username"`
	} `json:"settings"`

	// The type of streaming service configuration. Possible values: 'rtmp_custom' or 'rtmp_common'.
	Type string `json:"type"`
}

GetStreamSettingsResponse represents the response body for the "GetStreamSettings" request. Get the current streaming server settings.

Generated from https://github.com/Palakis/obs-websocket/blob/4.5.1/docs/generated/protocol.md#GetStreamSettings.

type GetStreamingStatusParams

type GetStreamingStatusParams struct {
	requests.ParamsBasic
}

GetStreamingStatusParams represents the params body for the "GetStreamingStatus" request. Get current streaming and recording status.

Generated from https://github.com/Palakis/obs-websocket/blob/4.5.1/docs/generated/protocol.md#GetStreamingStatus.

func (*GetStreamingStatusParams) Name

func (o *GetStreamingStatusParams) Name() string

Name just returns "GetStreamingStatus".

type GetStreamingStatusResponse

type GetStreamingStatusResponse struct {
	requests.ResponseBasic

	// Always false. Retrocompatibility with OBSRemote.
	PreviewOnly bool `json:"preview-only"`

	// Time elapsed since recording started (only present if currently recording).
	RecTimecode string `json:"rec-timecode"`

	// Current recording status.
	Recording bool `json:"recording"`

	// Time elapsed since streaming started (only present if currently streaming).
	StreamTimecode string `json:"stream-timecode"`

	// Current streaming status.
	Streaming bool `json:"streaming"`
}

GetStreamingStatusResponse represents the response body for the "GetStreamingStatus" request. Get current streaming and recording status.

Generated from https://github.com/Palakis/obs-websocket/blob/4.5.1/docs/generated/protocol.md#GetStreamingStatus.

type SaveStreamSettingsParams

type SaveStreamSettingsParams struct {
	requests.ParamsBasic
}

SaveStreamSettingsParams represents the params body for the "SaveStreamSettings" request. Save the current streaming server settings to disk.

Generated from https://github.com/Palakis/obs-websocket/blob/4.5.1/docs/generated/protocol.md#SaveStreamSettings.

func (*SaveStreamSettingsParams) Name

func (o *SaveStreamSettingsParams) Name() string

Name just returns "SaveStreamSettings".

type SaveStreamSettingsResponse

type SaveStreamSettingsResponse struct {
	requests.ResponseBasic
}

SaveStreamSettingsResponse represents the response body for the "SaveStreamSettings" request. Save the current streaming server settings to disk.

Generated from https://github.com/Palakis/obs-websocket/blob/4.5.1/docs/generated/protocol.md#SaveStreamSettings.

type SetStreamSettingsParams

type SetStreamSettingsParams struct {
	requests.ParamsBasic

	// Persist the settings to disk.
	Save bool `json:"save"`

	Settings struct {
		// The publish key.
		Key string `json:"key"`

		// The password for the streaming service.
		Password string `json:"password"`

		// The publish URL.
		Server string `json:"server"`

		// Indicates whether authentication should be used when connecting to the streaming server.
		UseAuth bool `json:"use-auth"`

		// The username for the streaming service.
		Username string `json:"username"`
	} `json:"settings"`

	// The type of streaming service configuration, usually `rtmp_custom` or `rtmp_common`.
	Type string `json:"type"`
}

SetStreamSettingsParams represents the params body for the "SetStreamSettings" request. Sets one or more attributes of the current streaming server settings. Any options not passed will remain unchanged. Returns the updated settings in response. If 'type' is different than the current streaming service type, all settings are required. Returns the full settings of the stream (the same as GetStreamSettings).

Generated from https://github.com/Palakis/obs-websocket/blob/4.5.1/docs/generated/protocol.md#SetStreamSettings.

func (*SetStreamSettingsParams) Name

func (o *SetStreamSettingsParams) Name() string

Name just returns "SetStreamSettings".

type SetStreamSettingsResponse

type SetStreamSettingsResponse struct {
	requests.ResponseBasic
}

SetStreamSettingsResponse represents the response body for the "SetStreamSettings" request. Sets one or more attributes of the current streaming server settings. Any options not passed will remain unchanged. Returns the updated settings in response. If 'type' is different than the current streaming service type, all settings are required. Returns the full settings of the stream (the same as GetStreamSettings).

Generated from https://github.com/Palakis/obs-websocket/blob/4.5.1/docs/generated/protocol.md#SetStreamSettings.

type StartStopStreamingParams

type StartStopStreamingParams struct {
	requests.ParamsBasic
}

StartStopStreamingParams represents the params body for the "StartStopStreaming" request. Toggle streaming on or off.

Generated from https://github.com/Palakis/obs-websocket/blob/4.5.1/docs/generated/protocol.md#StartStopStreaming.

func (*StartStopStreamingParams) Name

func (o *StartStopStreamingParams) Name() string

Name just returns "StartStopStreaming".

type StartStopStreamingResponse

type StartStopStreamingResponse struct {
	requests.ResponseBasic
}

StartStopStreamingResponse represents the response body for the "StartStopStreaming" request. Toggle streaming on or off.

Generated from https://github.com/Palakis/obs-websocket/blob/4.5.1/docs/generated/protocol.md#StartStopStreaming.

type StartStreamingParams

type StartStreamingParams struct {
	requests.ParamsBasic

	Stream struct {
		// Adds the given object parameters as encoded query string parameters to the 'key' of the
		// RTMP stream. Used to pass data to the RTMP service about the streaming. May be any
		// String, Numeric, or Boolean field.
		Metadata map[string]interface{} `json:"metadata"`

		Settings struct {
			// The publish key of the stream.
			Key string `json:"key"`

			// If authentication is enabled, the password for the streaming server. Ignored if
			// `use-auth` is not set to `true`.
			Password string `json:"password"`

			// The publish URL.
			Server string `json:"server"`

			// Indicates whether authentication should be used when connecting to the streaming
			// server.
			UseAuth bool `json:"use-auth"`

			// If authentication is enabled, the username for the streaming server. Ignored if
			// `use-auth` is not set to `true`.
			Username string `json:"username"`
		} `json:"settings"`

		// If specified ensures the type of stream matches the given type (usually 'rtmp_custom' or
		// 'rtmp_common'). If the currently configured stream type does not match the given stream
		// type, all settings must be specified in the `settings` object or an error will occur when
		// starting the stream.
		Type string `json:"type"`
	} `json:"stream"`
}

StartStreamingParams represents the params body for the "StartStreaming" request. Start streaming. Will return an `error` if streaming is already active.

Generated from https://github.com/Palakis/obs-websocket/blob/4.5.1/docs/generated/protocol.md#StartStreaming.

func (*StartStreamingParams) Name

func (o *StartStreamingParams) Name() string

Name just returns "StartStreaming".

type StartStreamingResponse

type StartStreamingResponse struct {
	requests.ResponseBasic
}

StartStreamingResponse represents the response body for the "StartStreaming" request. Start streaming. Will return an `error` if streaming is already active.

Generated from https://github.com/Palakis/obs-websocket/blob/4.5.1/docs/generated/protocol.md#StartStreaming.

type StopStreamingParams

type StopStreamingParams struct {
	requests.ParamsBasic
}

StopStreamingParams represents the params body for the "StopStreaming" request. Stop streaming. Will return an `error` if streaming is not active.

Generated from https://github.com/Palakis/obs-websocket/blob/4.5.1/docs/generated/protocol.md#StopStreaming.

func (*StopStreamingParams) Name

func (o *StopStreamingParams) Name() string

Name just returns "StopStreaming".

type StopStreamingResponse

type StopStreamingResponse struct {
	requests.ResponseBasic
}

StopStreamingResponse represents the response body for the "StopStreaming" request. Stop streaming. Will return an `error` if streaming is not active.

Generated from https://github.com/Palakis/obs-websocket/blob/4.5.1/docs/generated/protocol.md#StopStreaming.

Jump to

Keyboard shortcuts

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