-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoptions.js
69 lines (63 loc) · 1.31 KB
/
options.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
const Regex = require('@companion-module/base')
module.exports = {
CueType: {
id: 'cueType',
type: 'dropdown',
label: 'Cue Type',
default: 'next',
choices: [
{ id: 'next', label: 'Next' },
{ id: 'back', label: 'Back' },
{ id: 'black', label: 'Blackout' },
],
},
Channel: {
id: 'channel',
type: 'multidropdown',
label: 'CueEther Channels',
default: ['1', '2', '3', '4'],
choices: [
{ id: '1', label: '1' },
{ id: '2', label: '2' },
{ id: '3', label: '3' },
{ id: '4', label: '4' },
],
},
Protocol: {
id: 'protocol',
type: 'dropdown',
label: 'Connect with TCP / UDP',
default: 'udp',
width: 4,
choices: [
{ id: 'tcp', label: 'TCP' },
{ id: 'udp', label: 'UDP' },
],
},
Port: {
id: 'port',
type: 'textinput',
label: 'Target Port (default: 36710)',
default: 36710,
width: 5,
regex: Regex.PORT,
},
TargetIP: {
id: 'targetIP',
type: 'textinput',
label: 'CueEther Fixed IP',
default: "123.456.78.9",
width: 12,
regex: Regex.IP,
isVisible: (configValues) => configValues.protocol === 'tcp',
},
BroadcastIP: {
id: 'broadcastIP',
type: 'textinput',
label: 'Broadcast Address (default: 255.255.255.255)',
default: "255.255.255.255",
width: 12,
regex: Regex.IP,
isVisible: (configValues) => configValues.protocol === 'udp',
}
};