summaryrefslogtreecommitdiff
path: root/share/web_surfaces/shared/callback.js
diff options
context:
space:
mode:
authorLuciano Iam <lucianito@gmail.com>2020-04-14 22:58:44 +0200
committerRobin Gareus <robin@gareus.org>2020-04-17 20:15:10 +0200
commit50ba8dea96415f651b5173c017592dd46a2541ec (patch)
treec183a57cb0906f6465a48c9bb813d153bfe350bc /share/web_surfaces/shared/callback.js
parent612c71aa25a76b603ad1184a352f228817d1f820 (diff)
WebSockets: improve JS client and demo
add methods to callback.js automatically reconnect js client on disconnection mixer-demo do not recreate UI on reconnection NO-OP: indentation in message.js make client JS reconnection optional fix mixer-demo scrolling minor JS client refactor improve mixer-demo readability
Diffstat (limited to 'share/web_surfaces/shared/callback.js')
-rw-r--r--share/web_surfaces/shared/callback.js28
1 files changed, 24 insertions, 4 deletions
diff --git a/share/web_surfaces/shared/callback.js b/share/web_surfaces/shared/callback.js
index a510b118cf..9da8b420d2 100644
--- a/share/web_surfaces/shared/callback.js
+++ b/share/web_surfaces/shared/callback.js
@@ -20,14 +20,34 @@
export class ArdourCallback {
+ // Connection status
+ onConnected () {}
+ onDisconnected () {}
+
+ // All messages and errors
+ onMessage (msg) {}
+ onError (error) {}
+
+ // Globals
onTempo (bpm) {}
+
+ // Strips
+ onStripDesc (stripId, name) {}
+ onStripMeter (stripId, db) {}
onStripGain (stripId, db) {}
onStripPan (stripId, value) {}
onStripMute (stripId, value) {}
+
+ // Strip plugins
+ onStripPluginDesc (stripId, pluginId, name) {}
onStripPluginEnable (stripId, pluginId, value) {}
- onStripPluginParamValue (stripId, pluginId, paramId, value) {}
- onMessage (msg) {}
- onError (error) {}
+ // Strip plugin parameters
+ // valueType
+ // 'b' : boolean
+ // 'i' : integer
+ // 'd' : double
+ onStripPluginParamDesc (stripId, pluginId, paramId, name, valueType, min, max, isLog) {}
+ onStripPluginParamValue (stripId, pluginId, paramId, value) {}
- }
+}