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

addEventListener is not a function on Safari for MacOS #10

Open
leoogh opened this issue May 15, 2022 · 3 comments
Open

addEventListener is not a function on Safari for MacOS #10

leoogh opened this issue May 15, 2022 · 3 comments

Comments

@leoogh
Copy link

leoogh commented May 15, 2022

great library, but alas still an issue when running in Safari Version 15.4 (17613.1.17.1.13) on MacOS Monterey 12.3.1 (Apple silicon)

javascript console error:
Unhandled Promise Rejection: TypeError: t.addEventListener is not a function. (In 't.addEventListener("voiceschanged",()=>{t.getVoices().length>0&&n()})', 't.addEventListener' is undefined)

can reproduce it easily when navigating to the online demo site: will not enumerate the voices as a result

@jsakamoto
Copy link
Owner

@leoogh
Thank you for your report!

I'll investigate that problem.

@jsakamoto
Copy link
Owner

@leoogh
I released v.9.0.4.

And I also updated the live demonstration site.

Could you try them out?

By the way, Safari ver.15.1 (17612.2.9.1.20) doesn't have this problem.
I'm not sure whether Safari ver.15.2 and ver.15.3 also have this problem or not.

But, on Safari ver.15.4, the getVoices() method of Speech Synthesis API always returns an empty list, which is the root reason for this problem.
It looks a bug of Safari for me.

The latest version of this package fixed it by don't matter even if the result of the getVoices() method is empty.
However, that means users can't choose the voice on Safari v.15.4, and actually, I've not tested this package on Safari v.15.4.
If you try it out, could you tell me if that worked fine or not?

@leoogh
Copy link
Author

leoogh commented May 29, 2022

thanks for the fix! just upgraded to Monterey 12.4 with Safari 15.5 and can confirm the problem has disappeared in that version.

might indeed be a Safari 15.4 bug as you say - found this bug report on stackoverflow

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

No branches or pull requests

2 participants