Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Here's help: DON'T DO THAT SHIT. It's totally annoying and one of the things you just never do, just like auto-playing video.
-
C0D4681464yBrowser permissions will also block auto play.
But out of experience - the only sound that should be blasting through my headphones, is the sound I explicitly expect to be blasting through my headphones.
As for your HTML:
It works fine, as long as the path/to/file.MP3 is right and your browser isn't blocking it. -
guarrions194y@C0D4 okay, I see that is not a good ideai think I will not implement it in the future.
-
@guarrions I'd guess you have the wrong filename. The extension is missing. Also, the type doesn't look correct, should be "audio/mpeg".
-
-
Btw., it also fucks up accessibility because blind people relying on screenreaders suddenly get drowned in unexpected sound.
-
lun01984yjust NO. dont do any fucking autoplay shit. ask yourself: did user asked to play any media? it should only be on demand.
-
kiki352174yAhhhh.
Create an audio. Create a button. Tie audio playback start to that button’s onclick. Now click() the button.
...and go confront your boss about it. Audio autoplay almost always means ragequit.
Related Rants
Hello.I´ve been making my first html page and
I´m trying to implement an audio file in the background of the page without the control section. I have something like this,but the audio doesn´t plays:
<audio autoplay loop>
<source src="audio_route" type="audio/mp3">
</audio>
Any help will be welcome : )
question
html
css
html_audio