How to embed audio in your text
You can easily embed an audio player for an MP3 file by doing the following:
- Use the link icon in your editor to upload an MP3 file to your survey -- MP3 is a widely available audio format.
- Insert the link. You'll see something like the following:
Click on the source button in your editor, so you'll see something like this:
- Copy and paste the text below into your editor:
<source src="MYFILENAME.mp3" type="audio/mpeg">
Your browser does not support the audio element.
Copy and paste the file name and path (show in yellow in step 3) in your source view to replace the text MYFILENAME.mp3 as shown above, and then delete the code you created in step 3
So now you should have this in your editor:
Save your question
Test your changes by previewing your question -- you should see something like this:
Some notes about the code:
- The mpthreetest.mp3 part will be different for each answer (it's the audio file name).
- In this case the audio files are residing in the resource folder being used for this survey but they can be placed anywhere if you use an absolute URL in the src parameter - something like src="http://mysite.com/audio/audio_1.mp3"
- If the audio file doesn't exist where the src parameter indicates, the player will not appear.
- You'll need to insert the code into the answers using the source screen - click on "Edit answers", click the pencil beside the text box, click "Source" in the pop-up, enter the code and save it with the little diskette icon.
Although the above example places the audio in the answer text of the question, the same principles can be used to place it in the question text itself.
56 of 160 people found this helpful.