generated from bitfocus/companion-module-template-js
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpresets.js
116 lines (111 loc) · 1.87 KB
/
presets.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
import { combineRgb } from '@companion-module/base'
export function updatePresets() {
let presets = {}
presets['Start'] = {
type: 'button',
category: 'Streaming',
name: 'Start Stream',
style: {
text: 'Start Stream',
size: 'auto',
bgcolor: combineRgb(0, 0, 0),
color: combineRgb(255, 255, 255),
},
steps: [
{
down: [
{
actionId: 'stream',
options: {
stream_control: 'Start',
},
},
],
up: [],
},
],
feedbacks: [
{
feedbackId: 'streaming_state',
options: {
stream_state: 'Idle',
},
style: {
bgcolor: combineRgb(0, 0, 0),
color: combineRgb(255, 255, 255),
},
},
{
feedbackId: 'streaming_state',
options: {
stream_state: 'Connecting',
},
style: {
bgcolor: combineRgb(255, 128, 0),
color: combineRgb(255, 255, 255),
},
},
{
feedbackId: 'streaming_state',
options: {
stream_state: 'Streaming',
},
style: {
bgcolor: combineRgb(0, 204, 0),
color: combineRgb(255, 255, 255),
},
},
],
}
presets['Stop'] = {
type: 'button',
category: 'Streaming',
name: 'Stop Stream',
style: {
text: 'Stop Stream',
size: 'auto',
bgcolor: combineRgb(0, 0, 0),
color: combineRgb(255, 255, 255),
},
steps: [
{
down: [
{
actionId: 'stream',
options: {
stream_control: 'Stop',
},
},
],
up: [],
},
],
feedbacks: [],
}
presets['Reboot'] = {
type: 'button',
category: 'Device',
name: 'Reboot WebPresenter',
style: {
text: 'Reboot',
size: 'auto',
bgcolor: combineRgb(0, 0, 0),
color: combineRgb(255, 255, 255),
},
steps: [
{
down: [
{
actionId: 'device',
options: {
device_control: 'Reboot',
},
},
],
up: [],
},
],
feedbacks: [],
}
this.setPresetDefinitions(presets)
}