Files
companion-module-streamer.b…/feedbacks.js
2024-01-25 17:13:10 -05:00

34 lines
641 B
JavaScript

const { combineRgb } = require('@companion-module/base')
module.exports = async function (self) {
self.setFeedbackDefinitions({
ChannelState: {
name: 'Example Feedback',
type: 'boolean',
label: 'Channel 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
}
},
},
})
}