summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rw-r--r--share/web_surfaces/shared/ardour.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/share/web_surfaces/shared/ardour.js b/share/web_surfaces/shared/ardour.js
index 99342c650f..4c33a95950 100644
--- a/share/web_surfaces/shared/ardour.js
+++ b/share/web_surfaces/shared/ardour.js
@@ -42,6 +42,21 @@ export class Ardour {
}
}
+ async getSurfaceManifest () {
+ const response = await fetch('manifest.xml');
+
+ if (response.status == 200) {
+ const xmlText = await response.text();
+ const xmlDoc = new DOMParser().parseFromString(xmlText, 'text/xml');
+ return {
+ name: xmlDoc.getElementsByTagName('Name')[0].getAttribute('value'),
+ description: xmlDoc.getElementsByTagName('Description')[0].getAttribute('value')
+ }
+ } else {
+ throw new Error(`HTTP response status ${response.status}`);
+ }
+ }
+
// TO DO - add methods for dealing with messages flowing from/to the WebSockets channel
}