mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-24 00:19:21 +00:00
feat: OSC feedback (#236)
* feat: add playback status feedback to OSC API
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ontime-ui",
|
"name": "ontime-ui",
|
||||||
"version": "1.9.3",
|
"version": "1.9.4",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@chakra-ui/react": "^2.3.2",
|
"@chakra-ui/react": "^2.3.2",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ontime",
|
"name": "ontime",
|
||||||
"version": "1.9.3",
|
"version": "1.9.4",
|
||||||
"author": "Carlos Valente",
|
"author": "Carlos Valente",
|
||||||
"description": "Time keeping for live events",
|
"description": "Time keeping for live events",
|
||||||
"repository": "https://github.com/cpvalente/ontime",
|
"repository": "https://github.com/cpvalente/ontime",
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { Server } from 'node-osc';
|
|||||||
let oscServer = null;
|
let oscServer = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description utilty function to shutdown osc server
|
* @description utility function to shut down osc server
|
||||||
*/
|
*/
|
||||||
export const shutdownOSCServer = () => {
|
export const shutdownOSCServer = () => {
|
||||||
if (oscServer != null) oscServer.close();
|
if (oscServer != null) oscServer.close();
|
||||||
@@ -23,7 +23,7 @@ export const initiateOSC = (config) => {
|
|||||||
// message should look like /ontime/{path}/{args} where
|
// message should look like /ontime/{path}/{args} where
|
||||||
// ontime: fixed message for app
|
// ontime: fixed message for app
|
||||||
// path: command to be called
|
// 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
|
// split message
|
||||||
const [, address, path] = msg[0].split('/');
|
const [, address, path] = msg[0].split('/');
|
||||||
@@ -145,6 +145,12 @@ export const initiateOSC = (config) => {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case 'get-playback': {
|
||||||
|
const playback = global.timer.state;
|
||||||
|
global.timer.sendOsc('playback', playback);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default: {
|
default: {
|
||||||
global.timer.warning('RX', `OSC IN: unhandled message ${path}`);
|
global.timer.warning('RX', `OSC IN: unhandled message ${path}`);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "ontime-server",
|
"name": "ontime-server",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "1.4.0",
|
"version": "1.4.1",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"body-parser": "^1.20.0",
|
"body-parser": "^1.20.0",
|
||||||
"dotenv": "^16.0.1",
|
"dotenv": "^16.0.1",
|
||||||
|
|||||||
Reference in New Issue
Block a user