aboutsummaryrefslogtreecommitdiffstats
path: root/htdocs/alsa-core.html
diff options
context:
space:
mode:
authorFulup Ar Foll <fulup@iot.bzh>2017-03-07 22:35:52 +0100
committerFulup Ar Foll <fulup@iot.bzh>2017-03-07 22:35:52 +0100
commit49533399810630031541b25407cd88498a72f6c3 (patch)
tree1ab7d0e6063c609e97ca15d400e21c5618e63b45 /htdocs/alsa-core.html
parent3392199837251e8b165dda1eb0ec211d9c06dd0b (diff)
Lock on WS afb-daemon Segmentation fault
Diffstat (limited to 'htdocs/alsa-core.html')
-rw-r--r--htdocs/alsa-core.html43
1 files changed, 43 insertions, 0 deletions
diff --git a/htdocs/alsa-core.html b/htdocs/alsa-core.html
new file mode 100644
index 0000000..e408a01
--- /dev/null
+++ b/htdocs/alsa-core.html
@@ -0,0 +1,43 @@
+<html>
+<head>
+ <title>Hello world test</title>
+
+ <script type="text/javascript" src="websock.js"></script>
+ <script type="text/javascript">
+ var ws;
+
+ function onopen() {
+ document.getElementById("main").style.visibility = "visible";
+ document.getElementById("connected").innerHTML = "WebSocket Open";
+ }
+ function onabort() {
+ document.getElementById("main").style.visibility = "hidden";
+ document.getElementById("connected").innerHTML = "Connected Closed";
+ }
+ function init() {
+ ws = new AfbWsItf("api", onopen, onabort, new AfbCtxItf("hello"));
+ }
+ function replyok(obj) {
+ document.getElementById("output").innerHTML = "OK: "+JSON.stringify(obj);
+ }
+ function replyerr(obj) {
+ document.getElementById("output").innerHTML = "ERROR: "+JSON.stringify(obj);
+ }
+ function subscribe(devid) {
+ ws.call("alsacore", "subctl", {devid:devid}, replyok, replyerr);
+ }
+ </script>
+
+<body onload="init();">
+ <h1>Hello world test</h1>
+ <ol>
+ <li><a href="api/alsacore/getinfo">getinfo: List Sound Cards</a>
+ <li><a href="api/alsacore/getinfo?devid=hw:0">Card info about hw:0</a>
+ <li><a href="api/alsacore/getctl?devid=hw:0">List controls for hw:0 (quiet)</a>
+ <li><a href="api/alsacore/getctl?devid=hw:0&quiet=0">List controls for hw:0 (verbose)</a>
+ <li><a href="api/alsacore/getctl?devid=hw:0&numid=1&quiet=0">return control numid=1 for hw:0</a>
+ <li><button id="connected" onclick="subscribe('hw:0')">Click to Connected</button></li>
+ <div id="main" style="visibility:hidden">
+ <p>Event Output</p>
+ Server says... <div id="output"></div>
+ </div>