mirror of
https://github.com/RavenX8/companion-module-voicemod.git
synced 2026-04-03 21:08:51 -04:00
Added config fields
Updated voicemod library Updated actions to be more reliable
This commit is contained in:
26
main.js
26
main.js
@@ -18,7 +18,7 @@ class ModuleInstance extends InstanceBase {
|
||||
this.log('debug', 'init called')
|
||||
|
||||
this.updateStatus(InstanceStatus.Connecting)
|
||||
this.vm = new VoiceMod()
|
||||
this.vm = new VoiceMod(this.config.host, this.config.apiKey === '' ? 'anyClient' : this.config.apiKey)
|
||||
try {
|
||||
this.vm.init().then(
|
||||
async () => {
|
||||
@@ -49,15 +49,31 @@ class ModuleInstance extends InstanceBase {
|
||||
|
||||
// Return config fields for web config
|
||||
getConfigFields() {
|
||||
return []
|
||||
return [
|
||||
{
|
||||
id: 'host',
|
||||
type: 'textinput',
|
||||
label: 'Host address',
|
||||
tooltip: 'Enter the IP/Hostname for the voicemod instance',
|
||||
default: '127.0.0.1',
|
||||
},
|
||||
{
|
||||
id: 'apiKey',
|
||||
type: 'textinput',
|
||||
label: 'API Key',
|
||||
tooltip: 'Enter your developer API Key for voicemod (not required for now)',
|
||||
default: '',
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
updateActionsFeedbacksVariables() {
|
||||
// this.organizeChoices()
|
||||
|
||||
this.updateActions() // export actions
|
||||
// this.updateFeedbacks() // export feedbacks
|
||||
// this.updateVariableDefinitions() // export variable definitions
|
||||
this.updateVariableDefinitions() // export variable definitions
|
||||
|
||||
this.subscribeActions()
|
||||
// this.subscribeFeedbacks()
|
||||
// this.checkFeedbacks()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user