-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathfeedbacks.js
156 lines (153 loc) · 3.1 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
import { combineRgb } from '@companion-module/base'
export function GetFeedbackDefinitions(self) {
const ON_OFF = [
{id: true, label: 'On'},
{id: false, label: 'Off'},
]
return {
c_status: {
type: 'boolean',
name: 'Player State',
description: 'Change button style for Player State',
defaultStyle: {
bgcolor: combineRgb(128, 0, 0),
color: 16777215,
},
options: [
{
type: 'dropdown',
label: 'Which Status?',
id: 'playStat',
default: '0',
choices: [
{ id: '0', label: 'Stopped' },
{ id: '1', label: 'Paused' },
{ id: '2', label: 'Playing' },
],
},
],
callback: (fb) => {
return self.PlayState == parseInt(fb.options.playStat)
},
},
c_cue: {
type: 'boolean',
name: 'Item state',
description: 'Change button style for single Item State',
defaultStyle: {
bgcolor: combineRgb(0, 128, 0),
color: 16777215,
},
options: [
{
type: 'number',
label: 'Clip Number',
id: 'clip',
default: 1,
min: 0,
},
{
type: 'dropdown',
label: 'Which Status?',
id: 'playStat',
default: '2',
choices: [
{ id: '0', label: 'Stopped' },
{ id: '1', label: 'Paused' },
{ id: '2', label: 'Playing' },
],
},
],
callback: (fb) => {
const options = fb.options
if (self.PlayStatus.num == parseInt(options.clip)) {
return self.PlayState == parseInt(options.playStat)
}
},
},
c_loop: {
type: 'boolean',
name: 'Loop mode',
description: 'Change button style when Player Loop mode is',
defaultStyle: {
bgcolor: combineRgb(0, 128, 128),
color: 16777215,
},
options: [
{
type: 'dropdown',
label: 'Status',
id: 'opt',
default: true,
choices: ON_OFF,
}
],
callback: (fb) => {
return !!self.PlayLoop == fb.options.opt
},
},
c_repeat: {
type: 'boolean',
name: 'Repeat mode',
description: 'Change button style when Player Repeat mode is',
defaultStyle: {
bgcolor: combineRgb(128, 0, 128),
color: 16777215,
},
options: [
{
type: 'dropdown',
label: 'Status',
id: 'opt',
default: true,
choices: ON_OFF,
}
],
callback: (fb) => {
return !!self.PlayRepeat == fb.options.opt
},
},
c_shuffle: {
type: 'boolean',
name: 'Shuffle mode',
description: 'Change button style when Player in Shuffle is',
defaultStyle: {
bgcolor: combineRgb(0, 0, 128),
color: 16777215,
},
options: [
{
type: 'dropdown',
label: 'Status',
id: 'opt',
default: true,
choices: ON_OFF,
}
],
callback: (fb) => {
return !!self.PlayShuffle == fb.options.opt
},
},
c_full: {
type: 'boolean',
name: 'Full Screen',
description: 'Change button style when Player is Full Screen is',
defaultStyle: {
bgcolor: combineRgb(204, 0, 128),
color: 16777215,
},
options: [
{
type: 'dropdown',
label: 'Status',
id: 'opt',
default: true,
choices: ON_OFF,
}
],
callback: (fb) => {
return !!self.PlayFull == fb.options.opt
},
},
}
}