Skip to main content

Source <Filters>

Hierarchy

Index

Constructors

constructor

Properties

filters

filters: Filter<Settings, Source<{}>>[] = []

itemInstances

itemInstances: Set<SceneItem<Source<{}>, Scene<{}, {}>>> = ...

kind

kind: string

linked

linked: boolean = false

name

name: string

obs

obs: OBS

Accessors

exists

  • get exists(): boolean
  • Whether this source has at least one scene item in OBS


    Returns boolean

initialized

  • get initialized(): boolean
  • Whether initialize has been called on this source yet


    Returns boolean

Methods

addFilter

  • addFilter(ref: string, filter: Filter<Settings, Source<{}>>): Promise<void>
  • Adds a filter to this source, provided that 1. The filter has not already been applied to another source, and 2. The source in OBS does not have a filter with a different type but the same name as the filter being added.


    Parameters

    Returns Promise<void>

createSceneItemObject

  • Overridable function for creating SceneItem instances for a source. Doesn’t create any objects in OBS. Instead, creates SceneItem objects that can override default SceneItem behaviours.


    Parameters

    • scene: Scene<{}, {}>
    • id: number
    • ref: string

    Returns SceneItem<Source<Filters>, Scene<{}, {}>>

    An instance of SceneItem or a class that extends it.

filter

  • filter<R>(ref: R): Filters[R]
  • filter(ref: string): undefined | Filter<Settings, Source<{}>>
  • Gets a filter from the input by its ref


    Type parameters

    • R: string | number | symbol

    Parameters

    • ref: R

    Returns Filters[R]

getPrivateSettings

  • getPrivateSettings(): Promise<Settings>
  • 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>

setPrivateSettings

  • setPrivateSettings(settings: Settings): Promise<void>
  • 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>