feat: OSC feedback (#236)

* feat: add playback status feedback to OSC API
This commit is contained in:
Carlos Valente
2022-11-03 14:57:53 +01:00
committed by GitHub
parent 45cfb633de
commit 159ba82e00
4 changed files with 11 additions and 5 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "ontime-ui",
"version": "1.9.3",
"version": "1.9.4",
"private": true,
"dependencies": {
"@chakra-ui/react": "^2.3.2",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "ontime",
"version": "1.9.3",
"version": "1.9.4",
"author": "Carlos Valente",
"description": "Time keeping for live events",
"repository": "https://github.com/cpvalente/ontime",
+8 -2
View File
@@ -3,7 +3,7 @@ import { Server } from 'node-osc';
let oscServer = null;
/**
* @description utilty function to shutdown osc server
* @description utility function to shut down osc server
*/
export const shutdownOSCServer = () => {
if (oscServer != null) oscServer.close();
@@ -23,7 +23,7 @@ export const initiateOSC = (config) => {
// message should look like /ontime/{path}/{args} where
// ontime: fixed message for app
// path: command to be called
// args: extra data, only used on some of the API entries (delay, goto)
// args: extra data, only used on some API entries (delay, goto)
// split message
const [, address, path] = msg[0].split('/');
@@ -145,6 +145,12 @@ export const initiateOSC = (config) => {
break;
}
case 'get-playback': {
const playback = global.timer.state;
global.timer.sendOsc('playback', playback);
break;
}
default: {
global.timer.warning('RX', `OSC IN: unhandled message ${path}`);
break;
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "ontime-server",
"type": "module",
"version": "1.4.0",
"version": "1.4.1",
"dependencies": {
"body-parser": "^1.20.0",
"dotenv": "^16.0.1",