Question

I try to add background sound in a rails app. The code is like this:

embed src="followme.mp3" autostart="true" loop="true" hidden="true"

but where should I put the sound? In the assets folder?

Was it helpful?

Solution

Easy Answer

Put the file in the public/ directory. Example: public/my_audio_file.mp3

Better, Cleaner Answer

Put all of your audio files in a single folder like: public/audio/my_audio_file.mp3. Then do something like:

embed src="audio/my_audio_file.mp3" autostart="true" loop="true" hidden="true"

OTHER TIPS

Go to the properties tab at the top ... select your project properties and then go to References. Make a new reference folder if one does not exist, and Add Reference. Now select the path wherever you have created the object audio file from its properties. Simple eh :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top