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
This commit is contained in:
Luciano Iam 2020-04-14 22:58:44 +02:00 committed by Robin Gareus
parent 612c71aa25
commit 50ba8dea96
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
9 changed files with 191 additions and 145 deletions

View file

@ -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);