How to embed Audio in Office Live
Works in:
Print this page
Solution last update on: February 10, 2009
1. First off choose what format of audio you are going to be using? WMA, MIDI, or MP3 are your best choices. You will also need to know what type of file it is to insert the proper MIME type.
Some common MIME types are listed in the table below:
| Format | File Ext | MIME Type |
| MIDI | .mid | audio/mid |
| MP3 | .mp3 | audio/mpeg or audio/x-mpeg |
| WAV | .wav | audio/wav or audio/x-wav |
2. Upload your file to the document gallery on your website. Need help with this?
3. Next paste the code below into the Custom Footer module changing necessary parameters:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" omit-xml-declaration="yes"/>
<xsl:template match="/">
<object data="/documents/.mp3" type="audio/x-mpeg" width="" height="">
<param name="src" value="/documents/.mp3" />
<param name="autoplay" value="false" />
<param name="autostart" value="false" />
<param name="playcount" value="1" />
<param name="controller" value="true" />
<param name="showcontrols" value="true" />
</object>
</xsl:template>
</xsl:stylesheet>
Parameters:
File Source: Needs to be changed in both places, just replace with the proper url to the audio file which will /documents/filename.mp3 if you uploaded it to the document gallery.
MIME type: change this to the proper MIME type for the file type you are using.
Height and width: Choose a width and height from the table below depending on what you want.
Windows Media Player | Quicktime |
| Height | Description | Height | Description |
| 26px | Displays controls without slider | | |
| 30px | Displays controls with Slider | | |
| | Width | Description |
| Width | Description | 17px | Displays play button |
| 42px | Displays play button | 49px | Displays play button plus volume control |
| 66px | Displays Play and Stop button | 74px | Everything else plus slider |
| 164px | Everything else plus next/previous and fast forward, reverse buttons | 150px | Everything else plus fast forward and reverse buttons |
| 279px | Everything else plus volume control | | |
| | | | |
| | | |
| | | |
| | | |