WebSockets: implement a JavaScript object-oriented client API

Multimedia / Ardour - Luciano Iam [gmail.com] - 10 June 2020 17:47 UTC

Replace previous callback based basic client with an easier to use object-oriented API that further abstracts the low level details of the WebSockets Server surface messaging protocol.

All built-in web surface demos were updated to use the new API.

ae4df127ad WebSockets: implement a JavaScript object-oriented client API
libs/surfaces/websockets/dispatcher.cc | 10 +-
share/web_surfaces/builtin/mixer-demo/js/main.js | 137 +++++++++---------
share/web_surfaces/builtin/mixer-demo/manifest.xml | 2 +-
share/web_surfaces/builtin/transport/main.js | 23 ++-
share/web_surfaces/builtin/transport/manifest.xml | 2 +-
share/web_surfaces/shared/ardour.js | 154 ++++++++++++---------
share/web_surfaces/shared/{ => base}/channel.js | 29 +++-
share/web_surfaces/shared/base/component.js | 93 +++++++++++++
share/web_surfaces/shared/base/observable.js | 64 +++++++++
.../shared/{message.js => base/protocol.js} | 2 +-
share/web_surfaces/shared/callback.js | 56 --------
share/web_surfaces/shared/components/mixer.js | 87 ++++++++++++
share/web_surfaces/shared/components/parameter.js | 95 +++++++++++++
share/web_surfaces/shared/components/plugin.js | 72 ++++++++++
share/web_surfaces/shared/components/strip.js | 116 ++++++++++++++++
share/web_surfaces/shared/components/transport.js | 81 +++++++++++
share/web_surfaces/shared/control.js | 89 ------------
share/web_surfaces/shared/metadata.js | 51 -------
18 files changed, 807 insertions(+), 356 deletions(-)

  • Share