13
0

WebSockets: add client getSurfaceManifest() example in mixer-demo

This commit is contained in:
Luciano Iam 2020-04-13 11:05:33 +02:00 committed by Robin Gareus
parent 9fa7eb15ac
commit 83353b3125
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
5 changed files with 14 additions and 2 deletions

View File

@ -27,6 +27,12 @@ div {
box-shadow: 0px 0px 10px #000; box-shadow: 0px 0px 10px #000;
} }
#manifest {
padding: 0.25em 0.5em;
opacity: 0.5;
background: rgba(0,0,0,0.4);
}
#log { #log {
height: 6em; height: 6em;
overflow: scroll; overflow: scroll;

View File

@ -8,6 +8,7 @@
</head> </head>
<body> <body>
<div id="main"> <div id="main">
<div id="manifest"></div>
<div id="strips"></div> <div id="strips"></div>
<div id="log"></div> <div id="log"></div>
</div> </div>

View File

@ -38,6 +38,11 @@ import { Switch, DiscreteSlider, ContinuousSlider, LogarithmicSlider,
main(); main();
function main () { function main () {
ardour.getSurfaceManifest().then((manifest) => {
const div = document.getElementById('manifest');
div.innerHTML = `${manifest.name} v${manifest.version}`;
});
ardour.addCallback({ ardour.addCallback({
onMessage: (msg) => { onMessage: (msg) => {
log(`${msg}`, 'message-in'); log(`${msg}`, 'message-in');

View File

@ -2,5 +2,5 @@
<WebSurface> <WebSurface>
<Name value="Mixer Demo"/> <Name value="Mixer Demo"/>
<Description value="Mixer control capabilities demo aimed at developers"/> <Description value="Mixer control capabilities demo aimed at developers"/>
<Version value="1.0.0"/> <Version value="0.0.1"/>
</WebSurface> </WebSurface>

View File

@ -2,5 +2,5 @@
<WebSurface> <WebSurface>
<Name value="Transport"/> <Name value="Transport"/>
<Description value="Provides basic transport control (under construction)"/> <Description value="Provides basic transport control (under construction)"/>
<Version value="1.0.0"/> <Version value="0.0.1"/>
</WebSurface> </WebSurface>