3 ms·
My company makes pluggable chat software. I'm sad about this development, because it means that we can't audibly notify users anymore when someone writes a mess
by skrebbel 8y ago
My company makes pluggable chat software. I'm sad about this development, because it means that we can't audibly notify users anymore when someone writes a message to them.
I wonder whether there's a way around that, but I don't see it.
- devit 8y agoYou are supposed to use the Web Notifications API and let the browser/OS choose whether it should play a sound.
- skrebbel 8y agoMany browsers don't play a sound when a notification is shown.
- GrinningFool 8y agoWhat about using the notifications API? Seems a cleaner way than autoplaying sound in any case. [1] https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API https://developer.mozilla.org/en-US/docs/Web/API/Notificatio...
- droobles 8y agoI've been messing around with the Web Audio API lately and the message Firefox leaves is that it will still work as long as the user initiates the sounds loading, not the page. So if the user opens your chat or maybe interacts with your page in a way that indicates they've given you permission to play sounds then you're good.
- jeltz 8y agoThat is a bit annoying for my usecase (playing a sound whenever a team scores a goal) where the users enable it manually but it is remembered with a cookie. Right now we just do not remember their sound preferences in Safari, which just like Firefox requires user interaction. So some responsible users are affected by this change, but it is also a necessary change due to too many abusers. This is why we cannot have nice things.
- Someone1234 8y agoSome of your competitors have been using it for a fake "ding" sound and a generic message when you visit a site. So while I sympathize a little, it is for the greater good.
- ghostly_s 8y agoGoToMeeting is now doing this, even when you are loading their site for the purpose of launching a meeting, so you get the pleasantry of an obnoxious sales support bot "notification" ding blaring through your speakerphone system.
- skrebbel 8y agoTrue! That really sucks. I was thinking something like a browser could allow audio in response to, say, a push notification (akin to how they allow popups to be created after user click events) but that'd be easily gameable for the situation you describe. There's no way a browser can distinguish between a legitimate message from a human and robospam. Thanks for the clarification.
- StavrosK 8y agoIt pops up a window when you visit the site, asking if you want to allow sounds. You just click "allow".
- sametmax 8y agoYou can whitelist.
- jeltz 8y agoYeah, it is a bit annoying (I have also been using autoplay responsibly, i.e. the customer will only get autoplay if they have enabled it which is remember with a cookie) but way too many sites abused autoplay.