Skip to content

Commit 18ac479

Browse files
Set infoDialog value on succes or deny permission
1 parent fc22c7e commit 18ac479

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

components/content/dancing-blob/index.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const blobRef = shallowRef<any>(null)
1010
const analyser = shallowRef();
1111
const audioStream = shallowRef();
1212
const dataArray = shallowRef();
13-
const showInfoDialog = shallowRef(true);
13+
const showInfoDialog = shallowRef(false);
1414
1515
// lifecycle
1616
onMounted(async () => {
@@ -21,8 +21,11 @@ onMounted(async () => {
2121
showInfoDialog.value = access.state != "granted";
2222
2323
audioStream.value = await navigator.mediaDevices.getUserMedia({ audio: true });
24+
showInfoDialog.value = false;
2425
handleMicrophoneAccess()
26+
2527
} catch (error) {
28+
showInfoDialog.value = true;
2629
alert('Not able to accessing microphone');
2730
}
2831
})

0 commit comments

Comments
 (0)