react-sound icon indicating copy to clipboard operation
react-sound copied to clipboard

Not play in chrome 66

Open frank780117 opened this issue 7 years ago • 7 comments

hi, sometimes not play sound, can you add mute or other property then I can use.

https://stackoverflow.com/questions/49930680/how-to-handle-uncaught-in-promise-domexception-play-failed-because-the-use

frank780117 avatar Aug 29 '18 06:08 frank780117

I also have this issue with Chrome. Strangely sometimes the sounds will play and sometimes they wont. Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first. https://goo.gl/xX8pDD

glodfinch avatar Sep 04 '18 17:09 glodfinch

Same issue as above ^

alaingoldman avatar Sep 20 '18 03:09 alaingoldman

It is because of the chrome's browser setting.

pallavi1993 avatar Sep 28 '18 10:09 pallavi1993

Indeed. It's because of this: https://developers.google.com/web/updates/2017/09/autoplay-policy-changes

You need to listen for a user interaction before you set the playStatus to Sound.status.PLAYING

justintemps avatar Nov 06 '18 13:11 justintemps

Please help to resolve this issue, I have the same warning

soundmanager2.js:1989 Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first. https://goo.gl/xX8pDD

andykotov avatar Dec 12 '19 11:12 andykotov

any update here guys?

derakhshanfar avatar Aug 11 '20 09:08 derakhshanfar

This turned out to be exactly what the error says - the user needs to interact with the page before you can autoplay sounds. I now have a small banner at the top of the page asking for autoplay permission, with a button for the user to click. Works great.

glodfinch avatar Aug 11 '20 14:08 glodfinch