Add UI for streamdelay start/stop functionality

This commit is contained in:
Max Goodhart
2020-09-06 21:05:22 -07:00
parent cc842247a7
commit e2c5414608
4 changed files with 43 additions and 9 deletions

View File

@@ -50,4 +50,8 @@ export default class StreamdelayClient extends EventEmitter {
setCensored(isCensored) {
this.ws.send(JSON.stringify({ isCensored }))
}
setStreamRunning(isStreamRunning) {
this.ws.send(JSON.stringify({ isStreamRunning }))
}
}

View File

@@ -306,6 +306,8 @@ async function main() {
}
} else if (msg.type === 'set-stream-censored' && streamdelayClient) {
streamdelayClient.setCensored(msg.isCensored)
} else if (msg.type === 'set-stream-running' && streamdelayClient) {
streamdelayClient.setStreamRunning(msg.isStreamRunning)
} else if (msg.type === 'create-invite') {
const { secret } = await auth.createToken({
kind: 'invite',