News for hackers. Stuff that matters.
Re:Make Front End Shit Again (2018) by DocTomoe on Thursday January 20, 2022 @02:55AM (#30006051)
And thank whatever deity you may or may not believe in that this changed. Yes, it sucks for these traditional websites, but advertisers abused it so much it hurt.
Re:Make Front End Shit Again (2018) by kamray23 on Thursday January 20, 2022 @03:03AM (#30006107)
Indeed. The end of autoplay being on by default or not being a setting at all is a blessing far more than anyone worth their salt has even thought it could be a curse.
Re:Make Front End Shit Again (2018) by codethief on Thursday January 20, 2022 @03:07AM (#30006134)
Shouldn't it be possible to still achieve auto-play using JavaScript? It's just a tiny bit more effort. :)
Re:Make Front End Shit Again (2018) by mmis1000 on Thursday January 20, 2022 @03:29AM (#30006302)
No, the browser checks the call stack of the javascript function. If the play() isn't a direct result of some kind of user interaction. It will just deny you from playing audio.

So play upon you open the page is no longer possible. You at least need to wait for the user to touch somewhere on the page.

Re:Make Front End Shit Again (2018) by Accacin on Thursday January 20, 2022 @03:45AM (#30006401)
Yeah there's all sorts of nonsense you can do to do autoplay. I kind of remember at one of my old jobs, to get autoplay working on some elearning courses, when the user clicked 'Start', we'd start the audio but not play anything, and then switch out the file that was played when required which would 'autoplay' as the user had already initiated the sound. At least that was the general idea afaik.
Re:Make Front End Shit Again (2018) by kamray23 on Friday January 21, 2022 @05:10AM (#30021500)
Only works well on single-page applications. A much more insidious strategy is to bind to the "Accept cookies" button.
Re:Make Front End Shit Again (2018) by danw1979 on Thursday January 20, 2022 @04:05AM (#30006546)
and now all we need to do is the same for video...
Re:Make Front End Shit Again (2018) by easrng on Thursday January 20, 2022 @04:09AM (#30006567)
Video does the same thing, except you can autoplay it if it's muted.