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?

Était-ce utile?

La 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"

Autres conseils

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 :)

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top