-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce start session algorithm #138
base: main
Are you sure you want to change the base?
Conversation
aa8dbf1
to
cbcd9f8
Compare
cbcd9f8
to
0ad5c8f
Compare
index.bs
Outdated
@@ -339,6 +351,16 @@ See <a href="https://lists.w3.org/Archives/Public/public-speech-api/2012Sep/0072 | |||
|
|||
</dl> | |||
|
|||
<p>When the <dfn>start session algorithm</dfn> with <var>requestMicrophonePermission</var> is invoked, the user agent MUST run the following steps: | |||
|
|||
1. If the [=current settings object=]'s [=relevant global object=]'s [=associated Document=] is NOT [=fully active=], throw an {{UnknownError}} and abort these steps. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that I used UnknownError
to match WebKit that already shipped Web Speech.
FYI Firefox uses InvalidStateError
instead but did not ship Web Speech. So even though, I'd personally be in favor of InvalidStateError
, I picked UnknownError
so that web developers already catching this properly based on Safari don't have to update their code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think webkit could align to whatever deemed appropriate, this is an edge case so this is likely not a web compat issue.
I also prefer InvalidStateError
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you and @evanbliu also prefer InvalidStateError
, I've updated this PR to use it.
Quick question for you folks! When adding web platform tests for this in https://chromium-review.googlesource.com/c/chromium/src/+/6237075, I used |
Blink owners have requested that we drop the "webkit" prefix from the Web Speech API implementation in Chrome. We'll have to maintain backwards compatibility indefinitely, but eventually we'll probably pretend like it doesn't exist. |
I've addressed @evanbliu's feedback and resolved conflicts. Let me know if there's more to address or if we can merge it. |
This PR addresses concerns raised in #135 (comment) and #126 (comment):
start()
andstart(MediaStreamTrack audioTrack)
throw if document is not fully active:start()
The following tasks have been completed:
Implementation commitment:
Preview | Diff