-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathupgrades.js
38 lines (37 loc) · 1.04 KB
/
upgrades.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
const { CreateConvertToBooleanFeedbackUpgradeScript } = require('@companion-module/base')
module.exports = [
/*
* Place your upgrade scripts here
* Remember that once it has been added it cannot be removed!
*/
CreateConvertToBooleanFeedbackUpgradeScript({
recording: true,
streaming: true,
tally_PGM: true,
tally_PVW: true,
}),
function IntroducePolling(context, props) {
let config = props.config
let update = false
if (typeof config.polling !== 'boolean') {
config.polling = false
update = true
}
if (typeof config.interval !== 'number' || config.interval < 0.5 || config.interval < 5000) {
config.interval = 2
update = true
}
if (update) {
return {
updatedConfig: config,
updatedActions: [],
updatedFeedbacks: [],
}
}
return {
updatedConfig: null,
updatedActions: [],
updatedFeedbacks: [],
}
},
]