Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. General Discussion
  3. Sound music on background

Sound music on background

Scheduled Pinned Locked Moved General Discussion
9 Posts 4 Posters 2.7k Views
  • 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 Offline
    M Offline
    melo_lenosier
    wrote on Sep 9, 2017, 5:44 PM last edited by
    #1

    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
    0
    • M Offline
      M Offline
      mariusjopen
      Global Moderator
      wrote on Sep 10, 2017, 1:47 PM last edited by
      #2

      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
      0
      • M Offline
        M Offline
        melo_lenosier
        wrote on Sep 10, 2017, 3:22 PM last edited by
        #3

        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
        0
        • M Offline
          M Offline
          mariusjopen
          Global Moderator
          wrote on Sep 12, 2017, 1:32 PM last edited by
          #4

          Hi melo_lenosier,

          great! Yes, it is the better way!

          Cool!

          Have a good day!

          Marius

          www.mariusjopen.world

          1 Reply Last reply
          0
          • Y Offline
            Y Offline
            YYY
            wrote on Oct 10, 2017, 8:56 PM last edited by YYY Oct 10, 2017, 5:16 PM
            #5

            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
            0
            • M Offline
              M Offline
              mariusjopen
              Global Moderator
              wrote on Oct 11, 2017, 11:43 AM last edited by
              #6

              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
              0
              • U Offline
                U Offline
                ute
                wrote on Feb 14, 2018, 12:37 AM last edited by
                #7

                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
                0
                • M Offline
                  M Offline
                  mariusjopen
                  Global Moderator
                  wrote on Feb 26, 2018, 12:27 PM last edited by
                  #8

                  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
                  0
                  • U Offline
                    U Offline
                    ute
                    wrote on Feb 27, 2018, 8:43 PM last edited by
                    #9
                    This post is deleted!
                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    I also code custom websites or custom Lay features.
                    💿 Email me here: 💿
                    info@laytheme.com

                    Before you post:
                    1. When using a WordPress Cache plugin, disable it or clear your cache.
                    2. Update Lay Theme and all Lay Theme Addons
                    3. Disable all Plugins
                    4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

                    This often solves issues you might run into

                    When you post:
                    1. Post a link to where the problem is
                    2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
                    3. If the problem is difficult to explain, post screenshots / link to a video to explain it
                    Online Users
                    Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
                    laytheme.com
                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Search