Sound music on background
-
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!
-
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-backgroundIf you get stuck with this – let me know!
Best!
Marius
-
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 -
Hi melo_lenosier,
great! Yes, it is the better way!
Cool!
Have a good day!
Marius
-
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. -
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
-
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!
:) -
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-javascriptAll the best!
Marius
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- 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:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it