mirror of
https://github.com/RavenX8/companion-module-voicemod.git
synced 2026-04-04 05:18:53 -04:00
### Added
- preset for hold to beep (basically the 'censor beep')
This commit is contained in:
14
main.js
14
main.js
@@ -3,6 +3,7 @@ const UpgradeScripts = require('./upgrades')
|
||||
const UpdateActions = require('./actions')
|
||||
const UpdateFeedbacks = require('./feedbacks')
|
||||
const UpdateVariableDefinitions = require('./variables')
|
||||
const UpdatePresets = require('./presets')
|
||||
const { VoiceMod } = require('voicemod')
|
||||
|
||||
class ModuleInstance extends InstanceBase {
|
||||
@@ -108,6 +109,7 @@ class ModuleInstance extends InstanceBase {
|
||||
|
||||
this.loaded = true
|
||||
this.updateStatus(InstanceStatus.Ok)
|
||||
this.updatePresets()
|
||||
this.updateActionsFeedbacksVariables()
|
||||
|
||||
this.log('debug', 'connected to VM and ready')
|
||||
@@ -123,7 +125,6 @@ class ModuleInstance extends InstanceBase {
|
||||
this.updateStatus(InstanceStatus.UnknownError)
|
||||
++this.failure
|
||||
}
|
||||
if (this.loaded === false) await this.sleep(500)
|
||||
} while (this.loaded === false && this.failure < 5)
|
||||
}
|
||||
// When module gets deleted
|
||||
@@ -146,13 +147,6 @@ class ModuleInstance extends InstanceBase {
|
||||
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: '',
|
||||
// },
|
||||
]
|
||||
}
|
||||
|
||||
@@ -183,6 +177,10 @@ class ModuleInstance extends InstanceBase {
|
||||
voiceSelected: this.currentVoiceName,
|
||||
})
|
||||
}
|
||||
|
||||
updatePresets() {
|
||||
UpdatePresets(this)
|
||||
}
|
||||
}
|
||||
|
||||
runEntrypoint(ModuleInstance, UpgradeScripts)
|
||||
|
||||
Reference in New Issue
Block a user