minor fixing

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

View File

@ -25,6 +25,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<title>{{=it.product.name}}</title> <title>{{=it.product.name}}</title>
<script type="text/javascript"> <script type="text/javascript">
function request(data) { function request(data) {
return window.webkit.messageHandlers.listener.postMessage(data); return window.webkit.messageHandlers.listener.postMessage(data);
} }
@ -77,11 +78,12 @@ window.onload = async function () {
topButtonElem = document.getElementById("topButton"); topButtonElem = document.getElementById("topButton");
var paramsElem = document.getElementById("params"); 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") { if (data.buses[i].type == "audio" && data.buses[i].direction == "input") {
hasAudioPermission = !await needAudioPermission(); hasAudioPermission = !await needAudioPermission();
break; break;
} }
}
topButtonElem.value = hasAudioPermission ? "START" : "INIT"; topButtonElem.value = hasAudioPermission ? "START" : "INIT";
topButtonElem.addEventListener("click", async function () { topButtonElem.addEventListener("click", async function () {