events

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 1 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetType added in v0.9.0

func GetType(name string) any

Types

type CurrentPreviewSceneChanged added in v0.9.0

type CurrentPreviewSceneChanged struct {
	// Name of the scene that was switched to
	SceneName string `json:"sceneName,omitempty"`
}

Represents the event body for the CurrentPreviewSceneChanged event.

The current preview scene has changed.

type CurrentProfileChanged added in v0.9.0

type CurrentProfileChanged struct {
	// Name of the new profile
	ProfileName string `json:"profileName,omitempty"`
}

Represents the event body for the CurrentProfileChanged event.

The current profile has changed.

type CurrentProfileChanging added in v0.9.0

type CurrentProfileChanging struct {
	// Name of the current profile
	ProfileName string `json:"profileName,omitempty"`
}

Represents the event body for the CurrentProfileChanging event.

The current profile has begun changing.

type CurrentProgramSceneChanged added in v0.9.0

type CurrentProgramSceneChanged struct {
	// Name of the scene that was switched to
	SceneName string `json:"sceneName,omitempty"`
}

Represents the event body for the CurrentProgramSceneChanged event.

The current program scene has changed.

type CurrentSceneCollectionChanged added in v0.9.0

type CurrentSceneCollectionChanged struct {
	// Name of the new scene collection
	SceneCollectionName string `json:"sceneCollectionName,omitempty"`
}

Represents the event body for the CurrentSceneCollectionChanged event.

The current scene collection has changed.

Note: If polling has been paused during `CurrentSceneCollectionChanging`, this is the que to restart polling.

type CurrentSceneCollectionChanging added in v0.9.0

type CurrentSceneCollectionChanging struct {
	// Name of the current scene collection
	SceneCollectionName string `json:"sceneCollectionName,omitempty"`
}

Represents the event body for the CurrentSceneCollectionChanging event.

The current scene collection has begun changing.

Note: We recommend using this event to trigger a pause of all polling requests, as performing any requests during a scene collection change is considered undefined behavior and can cause crashes!

type CurrentSceneTransitionChanged added in v0.9.0

type CurrentSceneTransitionChanged struct {
	// Name of the new transition
	TransitionName string `json:"transitionName,omitempty"`
}

Represents the event body for the CurrentSceneTransitionChanged event.

The current scene transition has changed.

type CurrentSceneTransitionDurationChanged added in v0.9.0

type CurrentSceneTransitionDurationChanged struct {
	// Transition duration in milliseconds
	TransitionDuration float64 `json:"transitionDuration,omitempty"`
}

Represents the event body for the CurrentSceneTransitionDurationChanged event.

The current scene transition duration has changed.

type CustomEvent added in v0.12.0

type CustomEvent struct {
	// Custom event data
	EventData map[string]any `json:"eventData,omitempty"`
}

Represents the event body for the CustomEvent event.

Custom event emitted by `BroadcastCustomEvent`.

type ExitStarted added in v0.9.0

type ExitStarted struct{}

Represents the event body for the ExitStarted event.

OBS has begun the shutdown process.

type InputActiveStateChanged added in v0.9.0

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

	// Whether the input is active
	VideoActive bool `json:"videoActive,omitempty"`
}

Represents the event body for the InputActiveStateChanged event.

An input's active state has changed.

When an input is active, it means it's being shown by the program feed.

type InputAudioBalanceChanged added in v0.9.0

type InputAudioBalanceChanged struct {
	// New audio balance value of the input
	InputAudioBalance float64 `json:"inputAudioBalance,omitempty"`

	// Name of the affected input
	InputName string `json:"inputName,omitempty"`
}

Represents the event body for the InputAudioBalanceChanged event.

The audio balance value of an input has changed.

type InputAudioMonitorTypeChanged added in v0.9.0

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

	// New monitor type of the input
	MonitorType string `json:"monitorType,omitempty"`
}

Represents the event body for the InputAudioMonitorTypeChanged event.

The monitor type of an input has changed.

Available types are:

- `OBS_MONITORING_TYPE_NONE` - `OBS_MONITORING_TYPE_MONITOR_ONLY` - `OBS_MONITORING_TYPE_MONITOR_AND_OUTPUT`

type InputAudioSyncOffsetChanged added in v0.9.0

type InputAudioSyncOffsetChanged struct {
	// New sync offset in milliseconds
	InputAudioSyncOffset float64 `json:"inputAudioSyncOffset,omitempty"`

	// Name of the input
	InputName string `json:"inputName,omitempty"`
}

Represents the event body for the InputAudioSyncOffsetChanged event.

The sync offset of an input has changed.

type InputAudioTracksChanged added in v0.9.0

type InputAudioTracksChanged struct {
	// Object of audio tracks along with their associated enable states
	InputAudioTracks *typedefs.InputAudioTracks `json:"inputAudioTracks,omitempty"`

	// Name of the input
	InputName string `json:"inputName,omitempty"`
}

Represents the event body for the InputAudioTracksChanged event.

The audio tracks of an input have changed.

type InputCreated added in v0.9.0

type InputCreated struct {
	// The default settings for the input
	DefaultInputSettings map[string]any `json:"defaultInputSettings,omitempty"`

	// The kind of the input
	InputKind string `json:"inputKind,omitempty"`

	// Name of the input
	InputName string `json:"inputName,omitempty"`

	// The settings configured to the input when it was created
	InputSettings map[string]any `json:"inputSettings,omitempty"`

	// The unversioned kind of input (aka no `_v2` stuff)
	UnversionedInputKind string `json:"unversionedInputKind,omitempty"`
}

Represents the event body for the InputCreated event.

An input has been created.

type InputMuteStateChanged added in v0.9.0

type InputMuteStateChanged struct {
	// Whether the input is muted
	InputMuted bool `json:"inputMuted,omitempty"`

	// Name of the input
	InputName string `json:"inputName,omitempty"`
}

Represents the event body for the InputMuteStateChanged event.

An input's mute state has changed.

type InputNameChanged added in v0.9.0

type InputNameChanged struct {
	// New name of the input
	InputName string `json:"inputName,omitempty"`

	// Old name of the input
	OldInputName string `json:"oldInputName,omitempty"`
}

Represents the event body for the InputNameChanged event.

The name of an input has changed.

type InputRemoved added in v0.9.0

type InputRemoved struct {
	// Name of the input
	InputName string `json:"inputName,omitempty"`
}

Represents the event body for the InputRemoved event.

An input has been removed.

type InputShowStateChanged added in v0.9.0

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

	// Whether the input is showing
	VideoShowing bool `json:"videoShowing,omitempty"`
}

Represents the event body for the InputShowStateChanged event.

An input's show state has changed.

When an input is showing, it means it's being shown by the preview or a dialog.

type InputVolumeChanged added in v0.9.0

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

	// New volume level in dB
	InputVolumeDb float64 `json:"inputVolumeDb,omitempty"`

	// New volume level multiplier
	InputVolumeMul float64 `json:"inputVolumeMul,omitempty"`
}

Represents the event body for the InputVolumeChanged event.

An input's volume level has changed.

type InputVolumeMeters added in v0.9.0

type InputVolumeMeters struct {
	// Array of active inputs with their associated volume levels
	Inputs []*typedefs.InputVolumeMeter `json:"inputs,omitempty"`
}

Represents the event body for the InputVolumeMeters event.

A high-volume event providing volume levels of all active inputs every 50 milliseconds.

type MediaInputActionTriggered added in v0.9.0

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

	// Action performed on the input. See `ObsMediaInputAction` enum
	MediaAction string `json:"mediaAction,omitempty"`
}

Represents the event body for the MediaInputActionTriggered event.

An action has been performed on an input.

type MediaInputPlaybackEnded added in v0.9.0

type MediaInputPlaybackEnded struct {
	// Name of the input
	InputName string `json:"inputName,omitempty"`
}

Represents the event body for the MediaInputPlaybackEnded event.

A media input has finished playing.

type MediaInputPlaybackStarted added in v0.9.0

type MediaInputPlaybackStarted struct {
	// Name of the input
	InputName string `json:"inputName,omitempty"`
}

Represents the event body for the MediaInputPlaybackStarted event.

A media input has started playing.

type ProfileListChanged

type ProfileListChanged struct {
	// Updated list of profiles
	Profiles []string `json:"profiles,omitempty"`
}

Represents the event body for the ProfileListChanged event.

The profile list has changed.

type RecordStateChanged added in v0.9.0

type RecordStateChanged struct {
	// Whether the output is active
	OutputActive bool `json:"outputActive,omitempty"`

	// File name for the saved recording, if record stopped. `null` otherwise
	OutputPath string `json:"outputPath,omitempty"`

	// The specific state of the output
	OutputState string `json:"outputState,omitempty"`
}

Represents the event body for the RecordStateChanged event.

The state of the record output has changed.

type ReplayBufferSaved added in v0.9.0

type ReplayBufferSaved struct {
	// Path of the saved replay file
	SavedReplayPath string `json:"savedReplayPath,omitempty"`
}

Represents the event body for the ReplayBufferSaved event.

The replay buffer has been saved.

type ReplayBufferStateChanged added in v0.9.0

type ReplayBufferStateChanged struct {
	// Whether the output is active
	OutputActive bool `json:"outputActive,omitempty"`

	// The specific state of the output
	OutputState string `json:"outputState,omitempty"`
}

Represents the event body for the ReplayBufferStateChanged event.

The state of the replay buffer output has changed.

type SceneCollectionListChanged

type SceneCollectionListChanged struct {
	// Updated list of scene collections
	SceneCollections []string `json:"sceneCollections,omitempty"`
}

Represents the event body for the SceneCollectionListChanged event.

The scene collection list has changed.

type SceneCreated added in v0.9.0

type SceneCreated struct {
	// Whether the new scene is a group
	IsGroup bool `json:"isGroup,omitempty"`

	// Name of the new scene
	SceneName string `json:"sceneName,omitempty"`
}

Represents the event body for the SceneCreated event.

A new scene has been created.

type SceneItemCreated added in v0.9.0

type SceneItemCreated struct {
	// Numeric ID of the scene item
	SceneItemId int `json:"sceneItemId,omitempty"`

	// Index position of the item
	SceneItemIndex int `json:"sceneItemIndex,omitempty"`

	// Name of the scene the item was added to
	SceneName string `json:"sceneName,omitempty"`

	// Name of the underlying source (input/scene)
	SourceName string `json:"sourceName,omitempty"`
}

Represents the event body for the SceneItemCreated event.

A scene item has been created.

type SceneItemEnableStateChanged added in v0.9.0

type SceneItemEnableStateChanged struct {
	// Whether the scene item is enabled (visible)
	SceneItemEnabled bool `json:"sceneItemEnabled,omitempty"`

	// Numeric ID of the scene item
	SceneItemId int `json:"sceneItemId,omitempty"`

	// Name of the scene the item is in
	SceneName string `json:"sceneName,omitempty"`
}

Represents the event body for the SceneItemEnableStateChanged event.

A scene item's enable state has changed.

type SceneItemListReindexed added in v0.9.0

type SceneItemListReindexed struct {
	// Array of scene item objects
	SceneItems []*typedefs.SceneItemBasic `json:"sceneItems,omitempty"`

	// Name of the scene
	SceneName string `json:"sceneName,omitempty"`
}

Represents the event body for the SceneItemListReindexed event.

A scene's item list has been reindexed.

type SceneItemLockStateChanged added in v0.9.0

type SceneItemLockStateChanged struct {
	// Numeric ID of the scene item
	SceneItemId int `json:"sceneItemId,omitempty"`

	// Whether the scene item is locked
	SceneItemLocked bool `json:"sceneItemLocked,omitempty"`

	// Name of the scene the item is in
	SceneName string `json:"sceneName,omitempty"`
}

Represents the event body for the SceneItemLockStateChanged event.

A scene item's lock state has changed.

type SceneItemRemoved

type SceneItemRemoved struct {
	// Numeric ID of the scene item
	SceneItemId int `json:"sceneItemId,omitempty"`

	// Name of the scene the item was removed from
	SceneName string `json:"sceneName,omitempty"`

	// Name of the underlying source (input/scene)
	SourceName string `json:"sourceName,omitempty"`
}

Represents the event body for the SceneItemRemoved event.

A scene item has been removed.

This event is not emitted when the scene the item is in is removed.

type SceneItemSelected added in v0.2.0

type SceneItemSelected struct {
	// Numeric ID of the scene item
	SceneItemId int `json:"sceneItemId,omitempty"`

	// Name of the scene the item is in
	SceneName string `json:"sceneName,omitempty"`
}

Represents the event body for the SceneItemSelected event.

A scene item has been selected in the Ui.

type SceneItemTransformChanged added in v0.2.0

type SceneItemTransformChanged struct {
	// Numeric ID of the scene item
	SceneItemId int `json:"sceneItemId,omitempty"`

	// New transform/crop info of the scene item
	SceneItemTransform *typedefs.SceneItemTransform `json:"sceneItemTransform,omitempty"`

	// The name of the scene the item is in
	SceneName string `json:"sceneName,omitempty"`
}

Represents the event body for the SceneItemTransformChanged event.

The transform/crop of a scene item has changed.

type SceneListChanged added in v0.9.0

type SceneListChanged struct {
	// Updated array of scenes
	Scenes []*typedefs.Scene `json:"scenes,omitempty"`
}

Represents the event body for the SceneListChanged event.

The list of scenes has changed.

TODO: Make OBS fire this event when scenes are reordered.

type SceneNameChanged added in v0.9.0

type SceneNameChanged struct {
	// Old name of the scene
	OldSceneName string `json:"oldSceneName,omitempty"`

	// New name of the scene
	SceneName string `json:"sceneName,omitempty"`
}

Represents the event body for the SceneNameChanged event.

The name of a scene has changed.

type SceneRemoved added in v0.9.0

type SceneRemoved struct {
	// Whether the scene was a group
	IsGroup bool `json:"isGroup,omitempty"`

	// Name of the removed scene
	SceneName string `json:"sceneName,omitempty"`
}

Represents the event body for the SceneRemoved event.

A scene has been removed.

type SceneTransitionEnded added in v0.9.0

type SceneTransitionEnded struct {
	// Scene transition name
	TransitionName string `json:"transitionName,omitempty"`
}

Represents the event body for the SceneTransitionEnded event.

A scene transition has completed fully.

Note: Does not appear to trigger when the transition is interrupted by the user.

type SceneTransitionStarted added in v0.9.0

type SceneTransitionStarted struct {
	// Scene transition name
	TransitionName string `json:"transitionName,omitempty"`
}

Represents the event body for the SceneTransitionStarted event.

A scene transition has started.

type SceneTransitionVideoEnded added in v0.9.0

type SceneTransitionVideoEnded struct {
	// Scene transition name
	TransitionName string `json:"transitionName,omitempty"`
}

Represents the event body for the SceneTransitionVideoEnded event.

A scene transition's video has completed fully.

Useful for stinger transitions to tell when the video *actually* ends. `SceneTransitionEnded` only signifies the cut point, not the completion of transition playback.

Note: Appears to be called by every transition, regardless of relevance.

type ScreenshotSaved added in v0.12.0

type ScreenshotSaved struct {
	// Path of the saved image file
	SavedScreenshotPath string `json:"savedScreenshotPath,omitempty"`
}

Represents the event body for the ScreenshotSaved event.

A screenshot has been saved.

Note: Triggered for the screenshot feature available in `Settings -> Hotkeys -> Screenshot Output` ONLY. Applications using `Get/SaveSourceScreenshot` should implement a `CustomEvent` if this kind of inter-client communication is desired.

type SourceFilterCreated added in v0.9.0

type SourceFilterCreated struct {
	// The default settings for the filter
	DefaultFilterSettings map[string]any `json:"defaultFilterSettings,omitempty"`

	// Index position of the filter
	FilterIndex int `json:"filterIndex,omitempty"`

	// The kind of the filter
	FilterKind string `json:"filterKind,omitempty"`

	// Name of the filter
	FilterName string `json:"filterName,omitempty"`

	// The settings configured to the filter when it was created
	FilterSettings map[string]any `json:"filterSettings,omitempty"`

	// Name of the source the filter was added to
	SourceName string `json:"sourceName,omitempty"`
}

Represents the event body for the SourceFilterCreated event.

A filter has been added to a source.

type SourceFilterEnableStateChanged added in v0.9.0

type SourceFilterEnableStateChanged struct {
	// Whether the filter is enabled
	FilterEnabled bool `json:"filterEnabled,omitempty"`

	// Name of the filter
	FilterName string `json:"filterName,omitempty"`

	// Name of the source the filter is on
	SourceName string `json:"sourceName,omitempty"`
}

Represents the event body for the SourceFilterEnableStateChanged event.

A source filter's enable state has changed.

type SourceFilterListReindexed added in v0.9.0

type SourceFilterListReindexed struct {
	// Array of filter objects
	Filters []*typedefs.Filter `json:"filters,omitempty"`

	// Name of the source
	SourceName string `json:"sourceName,omitempty"`
}

Represents the event body for the SourceFilterListReindexed event.

A source's filter list has been reindexed.

type SourceFilterNameChanged added in v0.9.0

type SourceFilterNameChanged struct {
	// New name of the filter
	FilterName string `json:"filterName,omitempty"`

	// Old name of the filter
	OldFilterName string `json:"oldFilterName,omitempty"`

	// The source the filter is on
	SourceName string `json:"sourceName,omitempty"`
}

Represents the event body for the SourceFilterNameChanged event.

The name of a source filter has changed.

type SourceFilterRemoved added in v0.2.0

type SourceFilterRemoved struct {
	// Name of the filter
	FilterName string `json:"filterName,omitempty"`

	// Name of the source the filter was on
	SourceName string `json:"sourceName,omitempty"`
}

Represents the event body for the SourceFilterRemoved event.

A filter has been removed from a source.

type StreamStateChanged added in v0.9.0

type StreamStateChanged struct {
	// Whether the output is active
	OutputActive bool `json:"outputActive,omitempty"`

	// The specific state of the output
	OutputState string `json:"outputState,omitempty"`
}

Represents the event body for the StreamStateChanged event.

The state of the stream output has changed.

type StudioModeStateChanged added in v0.9.0

type StudioModeStateChanged struct {
	// True == Enabled, False == Disabled
	StudioModeEnabled bool `json:"studioModeEnabled,omitempty"`
}

Represents the event body for the StudioModeStateChanged event.

Studio mode has been enabled or disabled.

type VendorEvent added in v0.9.0

type VendorEvent struct {
	// Vendor-provided event data. {} if event does not provide any data
	EventData map[string]any `json:"eventData,omitempty"`

	// Vendor-provided event typedef
	EventType string `json:"eventType,omitempty"`

	// Name of the vendor emitting the event
	VendorName string `json:"vendorName,omitempty"`
}

Represents the event body for the VendorEvent event.

An event has been emitted from a vendor.

A vendor is a unique name registered by a third-party plugin or script, which allows for custom requests and events to be added to obs-websocket. If a plugin or script implements vendor requests or events, documentation is expected to be provided with them.

type VirtualcamStateChanged added in v0.9.0

type VirtualcamStateChanged struct {
	// Whether the output is active
	OutputActive bool `json:"outputActive,omitempty"`

	// The specific state of the output
	OutputState string `json:"outputState,omitempty"`
}

Represents the event body for the VirtualcamStateChanged event.

The state of the virtualcam output has changed.

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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