Skip to content

Commit aa59647

Browse files
Update start session algorithm to fire not-allowed error if microphone access is denied (#166)
Co-authored-by: Evan Liu <[email protected]>
1 parent 324bb96 commit aa59647

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

index.bs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,9 @@ following steps:
512512
1. Abort these steps.
513513
1. Set {{[[started]]}} to `true`.
514514
1. If |requestMicrophonePermission| is `true` and [=request
515-
permission to use=] "`microphone`" is [=permission/"denied"=], abort
516-
these steps.
515+
permission to use=] "`microphone`" is [=permission/"denied"=]:
516+
1. [=Queue a task=] to [=fire an event=] named <a event for=SpeechRecognition>error</a> 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.
517+
1. Abort these steps.
517518
1. Once the system is successfully listening to the recognition, queue a task to
518519
[=fire an event=] named <a event for=SpeechRecognition>start</a> at [=this=].
519520

0 commit comments

Comments
 (0)