Join the conversation

Sign in to join this conversation, and others like it, in the communities you care about.

Frontend Hub

Talk anything related Frontend development, HTML/CSS, client side Javascript, Bootstrap, etc

Frontend Hub / General

Audio auto play not working

Audio auto play not working

Frontend Hub / General · March 17, 2020 at 8:39am

I used below code but it is not playing automatically, I am understand why it is not working. Please help me some.

<audio controls autoplay> <source src="horse.ogg" type="audio/ogg"> <source src="horse.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio>

Load previous messages

May 18, 2021 at 7:10pm

This happens with me once when google introduced its policy to stop autoplay music on load page, then i get a solution to make duplicate and first audio is blank with no sound and is 1 sec and then play original music which then works for me.

    • reply
    • like

    Try this trick this may help.

      • reply
      • like