Skip to content

Add "not-allowed" error code to SpeechSynthesis - #28

Merged
foolip merged 2 commits into
WebAudio:masterfrom
csharrison:allowed-to-speak
Aug 9, 2018
Merged

foolip merged 2 commits into
WebAudio:masterfrom
csharrison:allowed-to-speak

Conversation

@csharrison

@csharrison csharrison commented Jul 30, 2018 •

Copy link
Copy Markdown
Contributor

@csharrison

Copy link
Copy Markdown
Contributor Author

@minorninth @mounirlamouri @foolip FYI

The existing text to this spec do not really formalize when these errors will be fired. I could add a section to the "speak" section if it adds clarity.

Dominic also suggested offline to spell this like "needs-user-interaction" but I preferred to keep this in line with WebAudio / Media and leave it open to the UA to decide when speech is allowed.

@foolip

foolip commented Aug 6, 2018

Copy link
Copy Markdown
Collaborator

@csharrison these changes LGTM. I'd like to see this tested in web-platform-tests as well. Web Audio and HTML don't say anything normative about when playback should be refused, but I'd be happy to see it spelled out normatively in https://w3c.github.io/speech-api/#dom-speechsynthesis-speak. As you can see the prose in this spec isn't algorithmic or too precise, but if you can reference https://html.spec.whatwg.org/multipage/interaction.html#triggered-by-user-activation and "not-allowed" in the same sentence, that'd be enough to write a test for it. Would you mind doing that? Thanks!

@csharrison

Copy link
Copy Markdown
Contributor Author

@mounirlamouri Can you give any more historical context for why neither WebAudio / HTML specs spell out when playback should be refused? My fear is that this was chosen for a good reason, and that we should be cautious when diverging from the status quo.

@csharrison

Copy link
Copy Markdown
Contributor Author

I've written some WPT that exercise this error path in web-platform-tests/wpt#12327

@mounirlamouri

Copy link
Copy Markdown

The rules for autoplay vary between browsers and as of today, I do not think any two browser follow the same set of rules. Because the rules to set autoplay are deeply related to the expected user experience, we have left them as "user agent details" for now. The hope is that we will converge to a set of rule we all agree on.

@csharrison

Copy link
Copy Markdown
Contributor Author

Thanks! @foolip, let me know if you still want the normative changes applied here given the context in #28 (comment).

@foolip

foolip commented Aug 7, 2018

Copy link
Copy Markdown
Collaborator

@mounirlamouri are there tracking issues for converging on the conditions for when autoplay shouldn't work, i.e. the bits that would be required to be able to have a test that asserts that playback fails video.play() (or equivalent) is simply called from script?

@csharrison, how about filing an issue in this repo to define the precise condition, link that to any other similar issues in HTML / Web Audio, and then making the failure test in web-platform-tests/wpt#12327 tentative?

@foolip
foolip merged commit 544ed7c into WebAudio:master Aug 9, 2018
@foolip

foolip commented Aug 9, 2018

Copy link
Copy Markdown
Collaborator

Spec and test changes merged, thanks @csharrison!

foolip pushed a commit to web-platform-tests/wpt that referenced this pull request Aug 9, 2018
@mounirlamouri

Copy link
Copy Markdown

@foolip my plan was to discuss this with other browsers are TPAC and whether we could start an "autoplay" spec that could try to put into spec word some of the logic. Nothing more than this idea exist at the moment :)

moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Aug 15, 2018
…n, a=testonly

Automatic update from web-platform-testsSpeechSynthesis.speak requires activation (#12327)

Follows WebAudio/web-speech-api#28.
--

wpt-commits: d79d572569f3fef976d8de893897ac7a52656bcd
wpt-pr: 12327
jankeromnes pushed a commit to jankeromnes/gecko that referenced this pull request Aug 15, 2018
…n, a=testonly

Automatic update from web-platform-testsSpeechSynthesis.speak requires activation (#12327)

Follows WebAudio/web-speech-api#28.
--

wpt-commits: d79d572569f3fef976d8de893897ac7a52656bcd
wpt-pr: 12327
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 3, 2019
…n, a=testonly

Automatic update from web-platform-testsSpeechSynthesis.speak requires activation (#12327)

Follows WebAudio/web-speech-api#28.
--

wpt-commits: d79d572569f3fef976d8de893897ac7a52656bcd
wpt-pr: 12327

UltraBlame original commit: 0af3cd1d119b4aca7292fe54ed0985fa9494bb58
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 3, 2019
…n, a=testonly

Automatic update from web-platform-testsSpeechSynthesis.speak requires activation (#12327)

Follows WebAudio/web-speech-api#28.
--

wpt-commits: d79d572569f3fef976d8de893897ac7a52656bcd
wpt-pr: 12327

UltraBlame original commit: 0af3cd1d119b4aca7292fe54ed0985fa9494bb58
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 3, 2019
…n, a=testonly

Automatic update from web-platform-testsSpeechSynthesis.speak requires activation (#12327)

Follows WebAudio/web-speech-api#28.
--

wpt-commits: d79d572569f3fef976d8de893897ac7a52656bcd
wpt-pr: 12327

UltraBlame original commit: 0af3cd1d119b4aca7292fe54ed0985fa9494bb58
gcp pushed a commit to gcp/enterprise-firefox-old that referenced this pull request Feb 18, 2026
…n, a=testonly

Automatic update from web-platform-testsSpeechSynthesis.speak requires activation (#12327)

Follows WebAudio/web-speech-api#28.
--

wpt-commits: d79d572569f3fef976d8de893897ac7a52656bcd
wpt-pr: 12327
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants