mocks
Index
Classes
MockFilter
Type parameters
- TSource: Source
constructor
Type parameters
- TSource: Source<{}, TSource>
Parameters
args: CustomFilterArgs<MockFilterSettings>
Returns MockFilter<TSource>
enabled
kind
name
ref
settings
Type declaration
optionala?: number
optionalb?: string
source
getDefaultSettings
Returns Promise<Settings>
remove
Returns Promise<void>
setEnabled
Parameters
enabled: boolean
Returns Promise<void>
setSettings
Parameters
settings: { a?: number; b?: string }
overlay: boolean = true
Returns Promise<void>
MockInput
Type parameters
constructor
Type parameters
Parameters
args: CustomInputArgs<MockInputSettings, F>
Returns MockInput<F>
audioMonitorType
audioSyncOffset
filters
itemInstances
kind
linked
muted
name
obs
settings
Type declaration
optionala?: number
optionalb?: string
volume
Type declaration
db: number
mul: number
exists
Whether this source has at least one scene item in OBS
Returns boolean
initialized
Whether
initialize
has been called on this source yetReturns boolean
addFilter
createSceneItemObject
fetchExists
Returns Promise<boolean>
fetchProperties
Fetches the input’s mute, volume, audio sync offset and audio monitor type from OBS and assigns them to the input
Returns Promise<void>
filter
Gets a filter from the input by its ref
Type parameters
- R: never
Parameters
ref: R
Returns {}[R]
getDefaultSettings
Returns Promise<MockInputSettings>
getPrivateSettings
8 Get a source’s private settings. This is an UNDOCUMENTED request of obs-websocket, and SHOULD NOT be used unless you know what you’re doing.
Returns Promise<Settings>
initialize
Parameters
obs: OBS
Returns Promise<void>
remove
Returns Promise<void>
setAudioMonitorType
Parameters
type: MonitoringType
Returns Promise<void>
setAudioSyncOffset
Parameters
offset: number
Returns Promise<void>
setMuted
Parameters
muted: boolean
Returns Promise<void>
setName
Parameters
name: string
Returns Promise<void>
setPrivateSettings
Set a source’s private settings. This is an UNDOCUMENTED request of obs-websocket, and SHOULD NOT be used unless you know what you’re doing.
Parameters
settings: Settings
Returns Promise<void>
setSettings
Parameters
settings: { a?: number; b?: string }
overlay: boolean = true
Returns Promise<void>
setVolume
Parameters
data: { db?: number; mul?: number }
Returns Promise<void>
toggleMuted
Returns Promise<boolean>
MockOBSWebSocket
constructor
Returns MockOBSWebSocket
obs
call
Type parameters
- Type: keyof OBSRequestTypesOverrides | GetPersistentData | SetPersistentData | GetSceneCollectionList | SetCurrentSceneCollection | CreateSceneCollection | GetProfileList | SetCurrentProfile | CreateProfile | RemoveProfile | GetProfileParameter | SetProfileParameter | GetVideoSettings | SetVideoSettings | GetStreamServiceSettings | SetStreamServiceSettings | GetVersion | GetStats | BroadcastCustomEvent | CallVendorRequest | GetHotkeyList | TriggerHotkeyByName | TriggerHotkeyByKeySequence | Sleep | GetInputList | GetInputKindList | CreateInput | RemoveInput | SetInputName | GetInputDefaultSettings | GetInputSettings | SetInputSettings | GetInputMute | SetInputMute | ToggleInputMute | GetInputVolume | SetInputVolume | GetInputAudioSyncOffset | SetInputAudioSyncOffset | GetInputAudioMonitorType | GetInputPropertiesListPropertyItems | PressInputPropertiesButton | GetMediaInputStatus | SetMediaInputCursor | OffsetMediaInputCursor | TriggerMediaInputAction | GetRecordStatus | ToggleRecord | StartRecord | StopRecord | ToggleRecordPause | PauseRecord | ResumeRecord | GetRecordDirectory | GetSceneItemList | GetGroupItemList | GetSceneItemId | CreateSceneItem | RemoveSceneItem | DuplicateSceneItem | GetSceneItemTransform | GetSceneItemEnabled | SetSceneItemEnabled | GetSceneItemLocked | SetSceneItemLocked | GetSceneItemIndex | SetSceneItemIndex | GetSceneList | GetCurrentProgramScene | SetCurrentProgramScene | GetCurrentPreviewScene | SetCurrentPreviewScene | CreateScene | RemoveScene | SetSceneName | GetSourceActive | GetSourceScreenshot | SaveSourceScreenshot | GetStreamStatus | ToggleStream | StartStream | StopStream | GetTransitionKindList | GetSceneTransitionList | GetCurrentSceneTransition | SetCurrentSceneTransition | SetCurrentSceneTransitionDuration | SetCurrentSceneTransitionSettings | TriggerStudioModeTransition | GetStudioModeEnabled | SetStudioModeEnabled
Parameters
requestType: Type
optionalrequestData: Omit<OBSRequestTypes, keyof OBSRequestTypesOverrides> & OBSRequestTypesOverrides[Type]
Returns Promise<Omit<OBSResponseTypes, keyof OBSResponseTypesOverrides> & OBSResponseTypesOverrides[Type]>
connect
Parameters
url: string
password: string
subscriptions: any
Returns { rpcVersion?: number }
rpcVersion: number
Set transitively in initialize if source exists Set manually in createFirstSceneItem if source doesn’t exist