In this article, you will find out more about on to embed audio (.mp3) files in your Ebooks to combine the Ebook features (text, images) and your audio files.
If you wish to embed your uploaded audio files:
1. After Creating an Audio learning activity, hover over the activity and click on Settings.
2. Click on the audio file and the audio file will open in a new tab.
3. Copy the audio file URL.
4. After Creating an Ebook learning activity, hover over the activity and click on Edit Ebook.
5. Add an Embed ebook template and use the following code. Replace the XXXaudioURL with the URL of the audio file you copied and click on Save. You can then Preview the Ebook learning activity.
<div style="margin-left:auto;margin-right:auto;text-align:center"> <audio controls> <source src="XXXaudioURL" type="audio/mpeg"> </audio> </div>
Note: In case you decide to upload your audio (.mp3) file to a cloud service such as Google Drive, you will need to follow the steps below:
1. Upload the audio file to your cloud service, for example, Google Drive, and create a sharable link. You can find out more here. For example https://drive.google.com/file/d/1nQklEicsMeGBnv6zkHtXtyGy10S-/view?usp=sharing
2. Extract the ID from the sharable URL (between /d/ and /view?), for example: 1nQklEicsMeGBnv6zkHtXtyGy10S-
3. Use the following URL: https://docs.google.com/uc?export=download&id=
4. Add the extracted ID at the end of the URL for playing the audio file for example: https://docs.google.com/uc?export=download&id=1nQklEicsMeGzkHtXtyGy10S-
The final script should look like this:
<div style="margin-left:auto;margin-right:auto;text-align:center"> <audio controls> <source src="https://docs.google.com/uc?export=download&id=1nQklEicsMeGBnv6zkHtXtyGy10S " type="audio/mpeg"> </audio> </div>
This is how the audio file you embedded will look like. Your users can read the text and play the audio for a more interactive learning experience.