Skip to content

Commit

Permalink
connectedNdiSouce => connectedNdiSource (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
brianteeman authored Jan 31, 2025
1 parent 3183385 commit 82104d8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/functions/settings/feedbacks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,12 +330,12 @@ export function create(model: GoStreamModel, state: SettingsStateT): CompanionFe
const selectedNdiSource = state.ndiSources.find((source) => source.name === name)
if (!selectedNdiSource) return false
return (
state.connectedNdiSouce.name === selectedNdiSource.name &&
state.connectedNdiSouce.address === selectedNdiSource.address
state.connectedNdiSource.name === selectedNdiSource.name &&
state.connectedNdiSource.address === selectedNdiSource.address
)
},
learn: (feedback) => {
const ndiSource = state.connectedNdiSouce
const ndiSource = state.connectedNdiSource
if (ndiSource !== undefined) {
return {
...feedback.options,
Expand Down
6 changes: 3 additions & 3 deletions src/functions/settings/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export type SettingsStateT = {
deviceId: string
deviceName: string
ndiSources: NDISource[]
connectedNdiSouce: NDISource
connectedNdiSource: NDISource
}

export function create(model: GoStreamModel): SettingsStateT {
Expand All @@ -52,7 +52,7 @@ export function create(model: GoStreamModel): SettingsStateT {
deviceId: '',
deviceName: '',
ndiSources: [],
connectedNdiSouce: { name: '', address: '' },
connectedNdiSource: { name: '', address: '' },
}
}

Expand Down Expand Up @@ -157,7 +157,7 @@ export function update(state: SettingsStateT, data: GoStreamCmd): boolean {
break
case ActionId.NDIConnect:
if (!data.value) return false
state.connectedNdiSouce = { name: data.value[0], address: data.value[1] }
state.connectedNdiSource = { name: data.value[0], address: data.value[1] }
break
case ActionId.NDIList: {
if (!data.value) {
Expand Down
4 changes: 2 additions & 2 deletions src/functions/settings/variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function getValues(state: SettingsStateT): CompanionVariableValues {
newValues['deviceId'] = state['deviceId']
newValues['deviceName'] = state['deviceName']

newValues['connectedNDISource_name'] = state.connectedNdiSouce.name
newValues['connectedNDISource_address'] = state.connectedNdiSouce.address
newValues['connectedNDISource_name'] = state.connectedNdiSource.name
newValues['connectedNDISource_address'] = state.connectedNdiSource.address
return newValues
}

0 comments on commit 82104d8

Please sign in to comment.