Is it possible to have a background song on my website, but have it fade out when someone clicks on an audio file. I’d also want the audio file to fade in so it’s a seamless transition.

[ad_1]

Hi guys, basically the title. I'll preface this by saying I'm quite new to wordpress, but I've been finding my way around alright so far. I've got a pretty good handle on the design side, but still haven't dived deep on plugins because some cost money and it's hard to know which ones will do what I want and there's a lot of trial and error to find the right stuff. Anyway, I want to have a song playing on loop in the background of my website, but I also want the background music to stop playing when someone clicks on an audio file. I also don't want it to cut off abruptly, I'd want the background music to fade out as the audio file they clicked on fades in, just like a 0.5 or 1 second fade on each, and then have the background music fade in again when the audio file stops playing. Does anyone know if there is a plugin that will do this? or some type of work around? Any suggestions would be appreciated. Thanks

[ad_2]
2 Comments
  1. You might want to check out a couple of plugins like MP3 Music Player by Sonaar or Compact WP Audio Player. They can play background music and allow you to add audio files. However, you’ll probably need some custom code for the fading effects.

    If you know a bit of coding, using the HTML5 `<audio>` tag with JavaScript can give you full control. Libraries like Howler.js can help you create those fade-ins and fade-outs easily.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer