Skip to main content

FreetypeTextSource <Filters>

Hierarchy

Index

Constructors

constructor

Properties

audioMonitorType

audioMonitorType: MonitoringType = MonitoringType.None

audioSyncOffset

audioSyncOffset: number = 0

filters

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

itemInstances

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

kind

kind: string

linked

linked: boolean = false

muted

muted: boolean = false

name

name: string

obs

obs: OBS

settings

settings: { antialiasing?: boolean; color1?: number; color2?: number; font?: { face?: string | undefined; flags?: number | undefined; size?: number | undefined; style?: string | undefined; }; text?: string } = ...

Set transitively in initialize if source exists Set manually in createFirstSceneItem if source doesn’t exist


Type declaration

  • optionalantialiasing?: boolean
  • optionalcolor1?: number
  • optionalcolor2?: number
  • optionalfont?: { face?: string | undefined; flags?: number | undefined; size?: number | undefined; style?: string | undefined; }
  • optionaltext?: string

volume

volume: { db?: number; mul?: number } = ...

Type declaration

  • db: number
  • mul: number

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<FreetypeTextSource<Filters>, Scene<{}, {}>>

    An instance of SceneItem or a class that extends it.

fetchExists

  • fetchExists(): Promise<boolean>
  • Returns Promise<boolean>

fetchProperties

  • fetchProperties(): Promise<void>
  • 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

  • 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]

getDefaultSettings

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>

initialize

  • initialize(obs: OBS): Promise<void>
  • Parameters

    Returns Promise<void>

remove

  • remove(): Promise<void>
  • Returns Promise<void>

setAudioMonitorType

  • Parameters

    Returns Promise<void>

setAudioSyncOffset

  • setAudioSyncOffset(offset: number): Promise<void>
  • Parameters

    • offset: number

    Returns Promise<void>

setMuted

  • setMuted(muted: boolean): Promise<void>
  • Parameters

    • muted: boolean

    Returns Promise<void>

setName

  • setName(name: string): Promise<void>
  • Parameters

    • name: string

    Returns Promise<void>

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>

setSettings

  • setSettings(settings: { antialiasing?: boolean; color1?: number; color2?: number; font?: { face?: string | undefined; flags?: number | undefined; size?: number | undefined; style?: string | undefined; }; text?: string }, overlay?: boolean): Promise<void>
  • Parameters

    • settings: { antialiasing?: boolean; color1?: number; color2?: number; font?: { face?: string | undefined; flags?: number | undefined; size?: number | undefined; style?: string | undefined; }; text?: string }
    • overlay: boolean = true

    Returns Promise<void>

setVolume

  • setVolume(data: { db?: number; mul?: number }): Promise<void>
  • Parameters

    • data: { db?: number; mul?: number }

    Returns Promise<void>

toggleMuted

  • toggleMuted(): Promise<boolean>
  • Returns Promise<boolean>