- Added 5 new feedbacks

- Added callbacks for the new feedbacks

Known Issues:
- Feedbacks do not init with the current state of the buttons on startup.
This commit is contained in:
2023-12-22 23:20:37 -05:00
parent d1ef607952
commit 48db682ae5
3 changed files with 112 additions and 23 deletions

View File

@@ -2,31 +2,69 @@ const { combineRgb } = require('@companion-module/base')
module.exports = async function (self) {
self.setFeedbackDefinitions({
ChannelState: {
name: 'Example Feedback',
VoiceChangerState: {
name: 'Voice Changer State',
type: 'boolean',
label: 'Channel State',
label: 'Voice Changer State',
defaultStyle: {
bgcolor: combineRgb(255, 0, 0),
color: combineRgb(0, 0, 0),
},
options: [
{
id: 'num',
type: 'number',
label: 'Test',
default: 5,
min: 0,
max: 10,
},
],
callback: (feedback) => {
console.log('Hello world!', feedback.options.num)
if (feedback.options.num > 5) {
return true
} else {
return false
}
options: [],
callback: (feedback, context) => {
return self.voiceChangerEnabled
},
},
BackgroundEffectState: {
name: 'Background Effect State',
type: 'boolean',
label: 'Background Effect Status',
defaultStyle: {
bgcolor: combineRgb(255, 0, 0),
color: combineRgb(0, 0, 0),
},
options: [],
callback: (feedback, context) => {
return self.backgroundEffectsEnabled
},
},
HearMyVoiceState: {
name: 'Hear My Voice State',
type: 'boolean',
label: 'Hear My Voice State',
defaultStyle: {
bgcolor: combineRgb(255, 0, 0),
color: combineRgb(0, 0, 0),
},
options: [],
callback: (feedback, context) => {
return self.hearMyVoiceEnabled
},
},
MicMutedState: {
name: 'Microphone Mute State',
type: 'boolean',
label: 'Microphone Mute State',
defaultStyle: {
bgcolor: combineRgb(255, 0, 0),
color: combineRgb(0, 0, 0),
},
options: [],
callback: (feedback, context) => {
return self.muteEnabled
},
},
MemesMutedForMeState: {
name: 'Soundboard - Mute For Me State',
type: 'boolean',
label: 'Soundboard Mute For Me State',
defaultStyle: {
bgcolor: combineRgb(255, 0, 0),
color: combineRgb(0, 0, 0),
},
options: [],
callback: (feedback, context) => {
return self.muteMemesEnabled
},
},
})