minor fixing

This commit is contained in:
Paolo Marrone 2024-07-05 16:18:17 +02:00
parent acf92dd51d
commit f366841c2c
3 changed files with 134 additions and 132 deletions

View File

@ -21,10 +21,11 @@
-->
<html>
<head>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<title>{{=it.product.name}}</title>
<script type="text/javascript">
function request(data) {
return window.webkit.messageHandlers.listener.postMessage(data);
}
@ -77,11 +78,12 @@ window.onload = async function () {
topButtonElem = document.getElementById("topButton");
var paramsElem = document.getElementById("params");
for (var i = 0; i < data.buses.length; i++)
for (var i = 0; i < data.buses.length; i++) {
if (data.buses[i].type == "audio" && data.buses[i].direction == "input") {
hasAudioPermission = !await needAudioPermission();
break;
}
}
topButtonElem.value = hasAudioPermission ? "START" : "INIT";
topButtonElem.addEventListener("click", async function () {
@ -166,17 +168,17 @@ function gotAudioPermission() {
}
</script>
<style>
* {
* {
margin: 0;
padding: 0;
user-select: none;
}
}
body {
body {
margin: 1em;
}
}
#topButton {
#topButton {
width: 100%;
border: 0;
background-color: #04aa6d;
@ -185,15 +187,15 @@ body {
text-align: center;
margin-bottom: 1em;
padding: 1em;
}
}
.range {
.range {
width: 90%;
}
}
</style>
</head>
<body>
</head>
<body>
<input id="topButton" type="button">
<div id="params"></div>
</body>
</body>
</html>