-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathfeedbacks.js
83 lines (74 loc) · 1.54 KB
/
feedbacks.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
const { combineRgb } = require('@companion-module/base')
module.exports = async function (self) {
let feedbacks = {}
let defaultStyle = {
bgcolor: 0xff0000,
color: 0,
}
feedbacks['recording'] = {
name: 'Recording',
description: 'Change button style when camera is recording',
type: 'boolean',
defaultStyle,
options: [],
callback: (feedback) => {
if (self.recording == 1) {
return true
}
return false
}
}
feedbacks['streaming'] = {
name: 'Streaming',
description: 'Change button style when camera is streaming',
type: 'boolean',
defaultStyle,
options: [],
callback: (feedback) => {
if (self.streaming == 1) {
return true
}
return false
}
}
feedbacks['tracking'] = {
name: 'Tracking',
description: 'Change button style when tracking is active',
type: 'boolean',
defaultStyle,
options: [],
callback: (feedback) => {
if (self.tracking === 'On') {
return true
}
return false
}
}
feedbacks['tally_PGM'] = {
name: 'Tally on PGM',
description: 'Change button style when camera tally shows Program',
type: 'boolean',
defaultStyle,
options: [],
callback: (feedback) => {
if (self.tally == 'Program') {
return true
}
return false
}
}
feedbacks['tally_PVW'] = {
name: 'Tally on PVW',
description: 'Change button style when camera tally shows Preview',
type: 'boolean',
defaultStyle,
options: [],
callback: (feedback) => {
if (self.tally == "Preview") {
return true
}
return false
}
}
self.setFeedbackDefinitions(feedbacks)
}