Lay Theme Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    Sound music on background

    General Discussion
    4
    9
    2250
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      melo_lenosier last edited by

      Hello there,

      I wanted to add a specific .mp3 and autoplay it on background on a specific page. I should do it through the custom CSS and HTML?
      Any kind of help would be super appreciated! :)

      Thank you in advance!

      1 Reply Last reply Reply Quote 0
      • mariusjopen
        mariusjopen Global Moderator last edited by

        Hi melo_lenosier,

        there are many ways to achieve this.

        One is a very unclean but possible one.

        Embed a video in the Gridder with the sound. Then you give the video a class like and hide it with CSS.
        Of course the video needs to be on autoplay.

        Or you embed a code in the Gridder with the HTML embed.
        Have a look here:
        https://stackoverflow.com/questions/13402336/play-sound-file-in-a-web-page-in-the-background

        If you get stuck with this – let me know!

        Best!

        Marius

        www.mariusjopen.world

        1 Reply Last reply Reply Quote 0
        • M
          melo_lenosier last edited by

          Thank you for the answer Maruis.
          I preferred the second way!
          I did like this:

          <audio src="../Websitename/folder/file.mp3" loop="true" autoplay="true" controls="false">
          </audio>

          Works like a charm!
          Thanks

          1 Reply Last reply Reply Quote 0
          • mariusjopen
            mariusjopen Global Moderator last edited by

            Hi melo_lenosier,

            great! Yes, it is the better way!

            Cool!

            Have a good day!

            Marius

            www.mariusjopen.world

            1 Reply Last reply Reply Quote 0
            • Y
              YYY last edited by YYY

              hi,it still dosen't work on my website.
              I tried sound background music plug-in also, it works find on chrome but can't play on safari.

              I tried your code also, like this: <embed name="musiclinkfrommedialibrary" loop="true" hidden="true" src="Music.mp3"></embed>

              can you help me?
              I hope it can autoplay without player on my website.

              1 Reply Last reply Reply Quote 0
              • mariusjopen
                mariusjopen Global Moderator last edited by

                Hi @YYY

                When I look at your code I see that your src is only Music.mp3.

                You have a real path there?

                And what about the first and dirty solution I proposed?

                Best!

                Marius

                www.mariusjopen.world

                1 Reply Last reply Reply Quote 0
                • U
                  ute last edited by

                  hej there, i tried this code <audio src="http://richterstella.com/wp-content/uploads/2018/02/translate_tts.mp3" loop="false" autoplay="true" hidden="true">
                  </audio>

                  and it works. But it is still a loop, eventho i set loop=false. What am i not getting?
                  And is there a way to have a different sound everytime you refresh the page? i would love to have 1 of 5 different audio files played, whenever you refresh the front page.

                  Thanks in advance!
                  :)

                  1 Reply Last reply Reply Quote 0
                  • mariusjopen
                    mariusjopen Global Moderator last edited by

                    Dear @ute

                    to achieve this I recommend to look into jQuery.

                    It is not very difficult to achieve.

                    I hope you find a way! Let me know when you have specific questions of embeding it into Laytheme.

                    And be aware of this:
                    http://laytheme.com/documentation.html#custom-javascript

                    All the best!

                    Marius

                    www.mariusjopen.world

                    1 Reply Last reply Reply Quote 0
                    • U
                      ute last edited by

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post

                      Before you post

                      Use the Search Feature. Maybe there is already a solution to your issue.

                      1. Update Lay Theme and all Lay Theme Addons
                      2. Disable all Plugins
                      3. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code ", click "Save Changes"
                      4. Now see if your problem solved itself
                      5. Go here, see if your problem is listed here:
                      Troubleshooting

                      When you post:
                      1. Post a link to where the problem is
                      2. If the problem is difficult to explain, post screenshots / link to a video to explain it

                      Thanks!

                      Online Users

                      A
                      S
                      S
                      G
                      L
                      M
                      Z

                      Recent Topics

                      • S

                        can't change front page

                      • M

                        komische boxen auf der Website

                      • S

                        Theme crashed - because of Polylang?

                      laytheme.com