Skip to content
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

speechSynthesis.speak() without user activation is no longer allowed #102

Open
sjjhsjjh opened this issue Jul 17, 2021 · 2 comments
Open
Labels
bug Something isn't working

Comments

@sjjhsjjh
Copy link
Collaborator

sjjhsjjh commented Jul 17, 2021

Current Dasher Version Six logs the following error on load in some cases:

[Deprecation] speechSynthesis.speak() without user activation is no longer allowed since M71, around December 2018. See https://www.chromestatus.com/feature/5687444770914304 for more details

This happens if Speak On Stop is selected at page load time. I think it's because Dasher speaks the phrase "Speech is now active" at that time to warn the user that their browser will make noises.

Not sure what to do about this but maybe defer speaking the warning until the user moves the pointer or does something else that counts as activation.

Looks like current code to speak the warning is here:

this._speech.speak(

That's the UI listener though, which gets invoked by the control panel value loader. Awkward.

@willwade
Copy link
Collaborator

willwade commented Nov 8, 2021

That seems a rather big pain.. deferring might be best approach.

@gavinhenderson
Copy link
Member

I had similar issues with morse-learn. I used hound in the end because it seemed mostly to hack around the issue, but it wasnt totally reliable https://www.npmjs.com/package/hound

We could solve this problem for the desktop version by offloading the synthesis to the main process in electron. You also might be able to override the security check in electron somehow.

Although this doesn't help us when we go to other platforms.

@gavinhenderson gavinhenderson added the bug Something isn't working label Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants