Skip to content

Commit ca05bf7

Browse files
authored
Merge pull request #16 from stagetimerio/main
Release v2.2.0
2 parents 6585773 + 79e2bf5 commit ca05bf7

File tree

15 files changed

+1091
-653
lines changed

15 files changed

+1091
-653
lines changed

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@stagetimerio:registry=https://npm.pkg.github.com/

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
This module lets you remotely control your [Stagetimer.io](https://stagetimer.io/) timers.
44

55
See [HELP.md](./companion/HELP.md) for usage instructions.
6+
7+
Module development setup: https://github.com/bitfocus/companion-module-base/wiki

companion/HELP.md

Lines changed: 40 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ The following Actions are available:
4242
**Message actions:**
4343

4444
- **Message: Hide**
45-
Hide a message in the room
45+
Hide a message in the room
4646
- **Message: Show**
47-
Show a message in the room
47+
Show a message in the room
4848
- **Message: Toggle visibility**
49-
Show/hide a message in the room
49+
Show/hide a message in the room
5050
- **Message: Create new message**
51-
Create a new message in the room
51+
Create a new message in the room
5252

5353
**Timer actions:**
5454

@@ -61,7 +61,7 @@ The following Actions are available:
6161
- **Timer: Toggle playback**
6262
Toggle (start/stop) a specific timer in the room
6363
- **Timer: Create new timer**
64-
Create a new timer in the room
64+
Create a new timer in the room
6565

6666
**Transport actions:**
6767

@@ -77,6 +77,8 @@ The following Actions are available:
7777
Start/stop the highlighted timer in the room
7878
- **Transport: Stop**
7979
Stop the highlighted timer in the room
80+
- **Transport: Reset**
81+
Reset or restart the currently highlighted timer.
8082
- **Transport: Subtract time**
8183
Subtract an amount of time from the highlighted timer in the room.
8284

@@ -112,21 +114,45 @@ The following Actions are available:
112114

113115
## Variables
114116

115-
- `$(stagetimer:currentTimerAppearance)` - Timer appearance ([Docs](https://stagetimer.io/docs/using-timers/#timer-appearances))
116-
- `$(stagetimer:currentTimerDuration)` - Timer duration
117-
- `$(stagetimer:currentTimerDurationAsMs)` - Timer duration (ms)
118-
- `$(stagetimer:currentTimerId)` - Timer ID
119-
- `$(stagetimer:currentTimerName)` - Timer name
120-
- `$(stagetimer:currentTimerNotes)` - Timer notes
117+
**Room**
118+
- `$(stagetimer:roomId)` - Room ID
119+
- `$(stagetimer:roomName)` - Room name
120+
- `$(stagetimer:roomTimezone)` - Room timezone ([Docs](https://stagetimer.io/docs/using-timers/#timezones))
121+
122+
**Playback Snapshot**
123+
The time display is equal to the Stagetimer output, taking [timer appearance](https://stagetimer.io/docs/using-timers/#timer-appearances) into account ([Docs](https://stagetimer.io/docs/viewer/#3-timer)). The current time remaining is always strictly a countdown.
124+
125+
- `$(stagetimer:timeDisplay)` - Time Display
126+
- `$(stagetimer:timeDisplayHours)` - Time Display (hours)
127+
- `$(stagetimer:timeDisplayMinutes)` - Time Display (minutes)
128+
- `$(stagetimer:timeDisplaySeconds)` - Time Display (seconds)
121129
- `$(stagetimer:currentTimerRemaining)` - Timer remaining time
122130
- `$(stagetimer:currentTimerRemainingAsMs)` - Timer remaining time (ms)
123131
- `$(stagetimer:currentTimerRemainingHours)` - Timer remaining time (hours)
124132
- `$(stagetimer:currentTimerRemainingMinutes)` - Timer remaining time (minutes)
125133
- `$(stagetimer:currentTimerRemainingSeconds)` - Timer remaining time (seconds)
134+
135+
**Current Timer**
136+
- `$(stagetimer:currentTimerId)` - Timer ID
137+
- `$(stagetimer:currentTimerName)` - Timer name
126138
- `$(stagetimer:currentTimerSpeaker)` - Timer speaker
127-
- `$(stagetimer:roomId)` - Room ID
128-
- `$(stagetimer:roomName)` - Room name
129-
- `$(stagetimer:roomTimezone)` - Room timezone ([Docs](https://stagetimer.io/docs/using-timers/#timezones))
139+
- `$(stagetimer:currentTimerNotes)` - Timer notes
140+
- `$(stagetimer:currentTimerAppearance)` – Timer appearance ([Docs](https://stagetimer.io/docs/using-timers/#timer-appearances))
141+
- `$(stagetimer:currentTimerStartTime12h)` - Hard start time (12h format, [Docs](https://stagetimer.io/docs/using-timers/#using-the-start-time-properly))
142+
- `$(stagetimer:currentTimerStartTime24h)`- Hard start time (24h format, [Docs](https://stagetimer.io/docs/using-timers/#using-the-start-time-properly))
143+
- `$(stagetimer:currentTimerDuration)` - Timer duration
144+
- `$(stagetimer:currentTimerDurationAsMs)` - Timer duration (ms)
145+
146+
**Next Timer**
147+
- `$(stagetimer:nextTimerId)` - Timer ID
148+
- `$(stagetimer:nextTimerName)` - Timer name
149+
- `$(stagetimer:nextTimerSpeaker)` - Timer speaker
150+
- `$(stagetimer:nextTimerNotes)` - Timer notes
151+
- `$(stagetimer:nextTimerAppearance)` – Timer appearance ([Docs](https://stagetimer.io/docs/using-timers/#timer-appearances))
152+
- `$(stagetimer:nextTimerStartTime12h)` - Hard start time (12h format, [Docs](https://stagetimer.io/docs/using-timers/#using-the-start-time-properly))
153+
- `$(stagetimer:nextTimerStartTime24h)`- Hard start time (24h format, [Docs](https://stagetimer.io/docs/using-timers/#using-the-start-time-properly))
154+
- `$(stagetimer:nextTimerDuration)` - Timer duration
155+
- `$(stagetimer:nextTimerDurationAsMs)` - Timer duration (ms)
130156

131157
---
132158

companion/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "stagetimer",
44
"shortname": "stagetimer",
55
"description": "Stagetimer.io module for Companion v3",
6-
"version": "2.1.0",
6+
"version": "2.2.0",
77
"license": "MIT",
88
"repository": "git+https://github.com/bitfocus/companion-module-stagetimerio-api.git",
99
"bugs": "https://github.com/bitfocus/companion-module-stagetimerio-api/issues",

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
{
22
"name": "stagetimerio-api",
3-
"version": "2.1.0",
3+
"version": "2.2",
4+
"description": "Stagetimer.io module for Companion v3",
45
"main": "src/index.js",
56
"type": "module",
67
"scripts": {
78
"lint": "eslint ./src",
89
"test": "node --test"
910
},
1011
"license": "MIT",
12+
"author": "Lukas Hermann <lukas@stagetimer.io>",
1113
"repository": {
1214
"type": "git",
1315
"url": "git+https://github.com/bitfocus/companion-module-stagetimerio-api.git"
1416
},
1517
"dependencies": {
16-
"@companion-module/base": "~1.6.0",
18+
"@companion-module/base": "~1.8.0",
19+
"@stagetimerio/shared": "^1.6.4",
20+
"@stagetimerio/timeutils": "^1.6.1",
1721
"socket.io-client": "^4.7.1"
1822
},
1923
"devDependencies": {

src/actions.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export const actionIdType = {
1616
start: 'start',
1717
stop: 'stop',
1818
start_or_stop: 'start_or_stop',
19+
reset: 'reset',
1920
next: 'next',
2021
previous: 'previous',
2122
add_time: 'add_time',
@@ -290,22 +291,28 @@ export function loadActions (instance) {
290291
// Transport actions
291292
[actionIdType.start]: {
292293
name: 'Transport: Start',
293-
description: 'Start or resume the highlighted timer in the room',
294+
description: 'Start or resume the highlighted timer',
294295
options: [],
295296
callback: actionCallback,
296297
},
297298
[actionIdType.stop]: {
298299
name: 'Transport: Stop',
299-
description: 'Stop the highlighted timer in the room',
300+
description: 'Stop the highlighted timer',
300301
options: [],
301302
callback: actionCallback,
302303
},
303304
[actionIdType.start_or_stop]: {
304305
name: 'Transport: Start/stop',
305-
description: 'Start/stop the highlighted timer in the room',
306+
description: 'Start/stop the highlighted timer',
306307
options: [],
307308
callback: actionCallback,
308309
},
310+
[actionIdType.reset]: {
311+
name: 'Transport: Reset',
312+
description: 'Reset or restart the highlighted timer',
313+
options: actionOptions.autostart,
314+
callback: actionCallback,
315+
},
309316
[actionIdType.next]: {
310317
name: 'Transport: Next',
311318
description: 'Highlight the next timer in the list',

src/assets.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/presets.js

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,19 @@ function generatePresets () {
6868
getFeedbackDefaults(feedbackType.isStopped),
6969
],
7070
},
71+
{
72+
name: 'Reset',
73+
actionId: actionIdType.reset,
74+
style: {
75+
size: '14',
76+
text: 'Reset',
77+
alignment: 'center:bottom',
78+
png64: icons.reset,
79+
pngalignment: 'center:top',
80+
color: colors.white,
81+
bgcolor: colors.black,
82+
},
83+
},
7184
{
7285
name: 'Previous',
7386
actionId: actionIdType.previous,
@@ -184,11 +197,11 @@ function generatePresets () {
184197

185198
Viewer: [
186199
{
187-
name: 'Time remaining',
200+
name: 'Time display',
188201
actionId: '',
189202
style: {
190-
size: '18',
191-
text: `$(stagetimer:${variableType.currentTimerRemaining})`,
203+
size: 'auto',
204+
text: `$(stagetimer:${variableType.timeDisplay})`,
192205
color: colors.white,
193206
bgcolor: colors.black,
194207
},
@@ -200,11 +213,11 @@ function generatePresets () {
200213
],
201214
},
202215
{
203-
name: 'Time remaining (hours)',
216+
name: 'Time display (hours)',
204217
actionId: '',
205218
style: {
206219
size: 'auto',
207-
text: `\n$(stagetimer:${variableType.currentTimerRemainingHours})`,
220+
text: `\n$(stagetimer:${variableType.timeDisplayHours})`,
208221
color: colors.white,
209222
bgcolor: colors.black,
210223
},
@@ -216,11 +229,11 @@ function generatePresets () {
216229
],
217230
},
218231
{
219-
name: 'Time remaining (minutes)',
232+
name: 'Time display (minutes)',
220233
actionId: '',
221234
style: {
222235
size: 'auto',
223-
text: `\n$(stagetimer:${variableType.currentTimerRemainingMinutes})`,
236+
text: `\n$(stagetimer:${variableType.timeDisplayMinutes})`,
224237
color: colors.white,
225238
bgcolor: colors.black,
226239
},
@@ -232,11 +245,11 @@ function generatePresets () {
232245
],
233246
},
234247
{
235-
name: 'Time remaining (seconds)',
248+
name: 'Time display (seconds)',
236249
actionId: '',
237250
style: {
238251
size: 'auto',
239-
text: `\n$(stagetimer:${variableType.currentTimerRemainingSeconds})`,
252+
text: `\n$(stagetimer:${variableType.timeDisplaySeconds})`,
240253
color: colors.white,
241254
bgcolor: colors.black,
242255
},
@@ -247,7 +260,6 @@ function generatePresets () {
247260
getFeedbackDefaults(feedbackType.isWarningRed),
248261
],
249262
},
250-
251263
{
252264
name: 'Wrap-up indicator',
253265
actionId: '',

0 commit comments

Comments
 (0)