From 647e1016cec95e4a20e60f3fa762729c50902f90 Mon Sep 17 00:00:00 2001 From: Evan Liu Date: Wed, 18 Jun 2025 16:47:54 -0700 Subject: [PATCH] Update start session algorithm to fire not-allowed error if microphone access is denied --- index.bs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index 0638cba..ff960f0 100644 --- a/index.bs +++ b/index.bs @@ -512,8 +512,9 @@ following steps: 1. Abort these steps. 1. Set {{[[started]]}} to `true`. 1. If |requestMicrophonePermission| is `true` and [=request - permission to use=] "`microphone`" is [=permission/"denied"=], abort - these steps. + permission to use=] "`microphone`" is [=permission/"denied"=]: + 1. [=Queue a task=] to [=fire an event=] named error at [=this=] using {{SpeechRecognitionErrorEvent}} with its {{SpeechRecognitionErrorEvent/error}} attribute initialized to {{SpeechRecognitionErrorCode/not-allowed}} and its {{SpeechRecognitionErrorEvent/message}} attribute set to an implementation-defined string detailing the reason. + 1. Abort these steps. 1. Once the system is successfully listening to the recognition, queue a task to [=fire an event=] named start at [=this=].