diff options
author | Luciano Iam <lucianito@gmail.com> | 2020-04-14 22:58:44 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-04-17 20:15:10 +0200 |
commit | 50ba8dea96415f651b5173c017592dd46a2541ec (patch) | |
tree | c183a57cb0906f6465a48c9bb813d153bfe350bc /libs | |
parent | 612c71aa25a76b603ad1184a352f228817d1f820 (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 'libs')
-rw-r--r-- | libs/surfaces/websockets/dispatcher.cc | 11 | ||||
-rw-r--r-- | libs/surfaces/websockets/server.cc | 6 |
2 files changed, 8 insertions, 9 deletions
diff --git a/libs/surfaces/websockets/dispatcher.cc b/libs/surfaces/websockets/dispatcher.cc index b497c24081..62f64268aa 100644 --- a/libs/surfaces/websockets/dispatcher.cc +++ b/libs/surfaces/websockets/dispatcher.cc @@ -29,13 +29,13 @@ using namespace ARDOUR; #define NODE_METHOD_PAIR(x) (Node::x, &WebsocketsDispatcher::x##_handler) WebsocketsDispatcher::NodeMethodMap - WebsocketsDispatcher::_node_to_method = boost::assign::map_list_of + WebsocketsDispatcher::_node_to_method = boost::assign::map_list_of NODE_METHOD_PAIR (tempo) NODE_METHOD_PAIR (strip_gain) - NODE_METHOD_PAIR (strip_pan) - NODE_METHOD_PAIR (strip_mute) - NODE_METHOD_PAIR (strip_plugin_enable) - NODE_METHOD_PAIR (strip_plugin_param_value); + NODE_METHOD_PAIR (strip_pan) + NODE_METHOD_PAIR (strip_mute) + NODE_METHOD_PAIR (strip_plugin_enable) + NODE_METHOD_PAIR (strip_plugin_param_value); void WebsocketsDispatcher::dispatch (Client client, const NodeStateMessage& msg) @@ -105,7 +105,6 @@ WebsocketsDispatcher::update_all_nodes (Client client) val.push_back (std::string ("i")); val.push_back (pd.lower); val.push_back (pd.upper); - val.push_back (pd.integer_step); } else { val.push_back (std::string ("d")); val.push_back (pd.lower); diff --git a/libs/surfaces/websockets/server.cc b/libs/surfaces/websockets/server.cc index 7f52b261de..8bd7eb178b 100644 --- a/libs/surfaces/websockets/server.cc +++ b/libs/surfaces/websockets/server.cc @@ -92,10 +92,10 @@ WebsocketsServer::WebsocketsServer (ArdourSurface::ArdourWebsockets& surface) #if LWS_LIBRARY_VERSION_MAJOR < 3 /* older libwebsockets does not define mime type for svg files */ memset (&_lws_vhost_opt, 0, sizeof (lws_protocol_vhost_options)); - _lws_vhost_opt.name = ".svg"; - _lws_vhost_opt.value = "image/svg+xml"; + _lws_vhost_opt.name = ".svg"; + _lws_vhost_opt.value = "image/svg+xml"; _lws_mnt_index.extra_mimetypes = &_lws_vhost_opt; - _lws_mnt_user.extra_mimetypes = &_lws_vhost_opt; + _lws_mnt_user.extra_mimetypes = &_lws_vhost_opt; #endif } |