News for hackers. Stuff that matters.

Ask HN: How those websites play sound without user interaction first?

As far I know, there is no way to play any sound on a webpage if the user did not first interact with the page.

But Big compagny video like TikTok or Youtube achieve to do it. You can open a direct link to a TikTok video or a Youtube Short and it will play with sound without any click.

Does anyone know how they bypass the restriction ? Is it some kind of whitelist that the browsers implement ?

( 3 comments | 2 points | on HN )
Re:Ask HN: How those websites play sound without user intera... by gildas on Wednesday October 04, 2023 @01:32PM (#37768679)
It looks like these websites are in a whitelist, see https://blog.google/products/chrome/improving-autoplay-chrom...
Re:Ask HN: How those websites play sound without user intera... by RetroTechie on Wednesday October 04, 2023 @01:54PM (#37769048)
It would be nice if OP would say which browser / version / OS we're talking about.
Re:Ask HN: How those websites play sound without user intera... by dezmou on Wednesday October 04, 2023 @02:01PM (#37769140)
Happen in Chrome and Safari