Art Storefronts Support Center

Search for answers to your questions by entering keywords below, or look through our knowledge base.

How To: Embed Audio in the WYSIWYG Editor

Follow

When you’re working on your website, you may find you have some audio you want to embed on a page. For example if you have a recording of yourself talking about a piece of art, it’s possible to embed it in the product page so it can be played by visitors while they are on this page.

This article will explain how to take a recording which has been saved as an MP3, uploaded to Google Drive, and then adding code to a product page which will allow the audio to be played by visitors to your site. This process will work for adding audio clips to any WYSIWYG editor window.

 

 

Uploading your MP3

You will need to have your recording saved on your computer as a playable MP3 before you can begin. You will also need to have a Google account, as you will be uploading the file to your Google Drive file locker.

Explaining how to create your recording is outside of the scope of this article. However there are many useful articles you can find online which explain how to go through this process, such as this one from dummies.com named How to Create an MP3 File.

  1. Once you have your MP3 ready to upload, it’s time to login to your Google Drive account at https://drive.google.com/drive/my-drive. On the upper left of the window, click on New.
    audio01.png

  2. Select File upload.
    audio02.png

  3. Now select your MP3 from where it’s save on your computer, and click on Open.
    audio03.png

  4. A small popup will appear on the bottom-right of the page once this has been uploaded. Click on the icon on the right of the popup to select the file where it’s been saved in your Drive account.
    audio04.png

  5. This will scroll you down the page to display the file you’ve just uploaded.
    audio05.png

  6. Now right-click on it, and select Share.
    audio06.png

  7. On the pop-up that shows up, click on Advanced.
    audio07.png

  8. Under the Who has access section, click on Change to the right of the Private setting.
    audio08.png

  9. Now select Public on the web, then click on Save. This will make the file publicly accessible, provided you have a link to the file.
    audio09.png

  10. Now click on Done to return to the file list.
    audio10.png

  11. Now right-click on the MP3 again, and click on Share again.
    audio11.png

  12. Now click on the Copy link button.
    audio12.png

  13. Now let’s save the link so we can fix this later. Open Notepad (or TextEdit on Macs) and paste the link into the application window.
    audio13.png

  14. Now to create a new link which will be playable when embedded in the editor. What we will have to do is to copy out the unique identifier for the file from that link. The part we need to copy is the section displayed as Xs in the example link here. https://drive.google.com/file/d/XXXXXXXXXXXXXXXXXX/view?usp=sharing
    I will highlight the section and copy it out underneath. You will need to do this with your link to separate it.
    audio14.png

  15. What we will need to do now is to use that code in this link, where we will replace the section of Xs with the extracted section from the previous step.
    http://docs.google.com/uc?export=open&id=XXXXXXXXXXXXXXXXXX
    audio15.png

  16. Copy the unique identifier, then select the Xs, and paste the identifier over top to replace that.
    audio16.png

  17. Now that we have a link which we can add to code to embed on the site, so let’s move on to setting this up.
    audio17.png

 

 

Adding code to your product page

  1. Let’s start in the Site Manager. Scroll down and open the Art Print Store or Standard Store where your product is.
    audio18.png

  2. If you have the product in a category, select the category now.
    audio19.png

  3. Now find the product in the list, and click on edit.
    audio20.png

  4. Now scroll down until you see the Short Description editor window.
    audio21.png

  5. Now switch back to your Notepad/TextEdit window, and paste this code into it:
    <audio controls>
    <source src="http://docs.google.com/uc?export=open&id=XXXXXXXXXXXXXXXXXX" type="audio/mp3">
    </audio>
    audio22.png

  6. Highlight the previous line and copy it.
    audio23.png

  7. Now select the address in the source line further down the page.
    audio24.png

  8. Delete the highlighted text.
    audio25.png

  9. Now paste in the address into the location where you just deleted that text.
    audio26.png

  10. Now highlight and copy the last section, starting at <audio controls>, down to </audio>.
    audio27.png

  11. Let’s switch back to the Site Manager window, and click on the Source button in the editor section.
    audio28.png

  12. In this section I’m going to add a couple of extra lines at the front of the existing content in the page, and then paste in the code from the Notepad/TextEdit window. Now click on the Save button, and then we can click on the Preview Site button to see how the player looks on the live site.
    audio29.png

  13. When the page loads, you will see a player gadget displayed below the product name and above the rest of the short description text.
    audio30.png
Was this article helpful?
1 out of 1 found this helpful

Comments