In order to post, you must be logged in and have a membership.

Home Forums WordPress General Questions How to embed background music in my WordPress site?

Viewing 3 reply threads
  • Author
    Posts
    • #2515
      Edmund Yeo
      Participant

      Hi everyone,

      I have a client who wants me to embed a background music that auto plays when a person visits her website. I was wondering anyone has experience on how to do it?

      Thanks!

      Edmund

    • #2519
      Taylor Drayson
      Participant

      It is possible, not recommend for user experience. Also some browsers will block autoplaying.

      Plus it will stop playing when you switch page

    • #2520
      Soph Simmonds
      Moderator

      Hi Edmund,

      You can likely do it using the <audio> tag in a Code Block: https://www.w3schools.com/tags/att_audio_autoplay.asp.

      However, as mentioned by Taylor, some browsers will prevent it from playing.

    • #2521
      Edmund Yeo
      Participant

      Thank you Soph and Taylor

Viewing 3 reply threads
  • You must be logged in to reply to this topic.
menu
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram