Skip to main content
Participant
Oct 22, 2021 4:58 PM UTC
Answered

Audio tag

How do I change this so the audio starts in pause mode?

<audio
autoplay="autoplay" controls>
<source src="mysong.mp3">
</audio>

    This topic is closed to new replies. Start a new post to keep the conversation going.
    Nancy OShea
    Nancy OSheaCorrect answer
    Community Expert
    Oct 22, 2021 6:01 PM UTC

    Remove autoplay.

    <audio controls>
    <source src="mysong.mp3">
    </audio>
    

     

    Nancy O'Shea— Product User & Community Expert

    6 replies

    Participant
    Oct 25, 2021 10:33 PM UTC

    My error, it works, thanks.

    Translate
    Participant
    Oct 23, 2021 7:30 PM UTC

    I removed the ="autoplay"
    leaving
    <audio
    autoplay controls>
    <source src="mysong.mp3">
    </audio>

    The result is the same.

    Translate
    Nancy OShea
    Community Expert
    Community Expert
    Oct 23, 2021 7:53 PM UTC

    No.  Autoplay must be removed entirely.

     

    <audio controls>
    <source src="mysong.mp3">
    </audio>

     

    Translate
    Nancy O'Shea— Product User & Community Expert
    Nancy OShea
    Community Expert
    Community Expert
    Oct 23, 2021 8:23 PM UTC

    Please refer to this code tutorial about <audio> attributes and what they mean.

    https://www.w3schools.com/tags/tag_audio.asp

     

    Translate
    Nancy O'Shea— Product User & Community Expert
    Nancy OShea
    Community Expert
    Nancy OSheaCommunity ExpertCorrect answer
    Community Expert
    Oct 22, 2021 6:01 PM UTC

    Remove autoplay.

    <audio controls>
    <source src="mysong.mp3">
    </audio>
    

     

    Translate
    Nancy O'Shea— Product User & Community Expert