mirror of
https://github.com/RavenX8/companion-module-voicemod.git
synced 2026-04-03 12:58:52 -04:00
- 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:
78
feedbacks.js
78
feedbacks.js
@@ -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
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user