minor fixing
This commit is contained in:
parent
acf92dd51d
commit
f366841c2c
@ -21,10 +21,11 @@
|
|||||||
|
|
||||||
-->
|
-->
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<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 () {
|
||||||
@ -166,17 +168,17 @@ function gotAudioPermission() {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
margin: 1em;
|
margin: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
#topButton {
|
#topButton {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border: 0;
|
border: 0;
|
||||||
background-color: #04aa6d;
|
background-color: #04aa6d;
|
||||||
@ -185,15 +187,15 @@ body {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.range {
|
.range {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<input id="topButton" type="button">
|
<input id="topButton" type="button">
|
||||||
<div id="params"></div>
|
<div id="params"></div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user