Adding Audio Files

The steps below will show you how to place an audio player on your page that allows visitors to listen to an audio file. Files used on the website must be in MP3 format.

Using TerminalFour

First, upload your file to the Media Library as you would any image you plan to use on a page. TerminalFour will automatically select the "Audio Path" content type for you.

Next, add a new piece of content to your page using the "Audio File" Content Template. Give the content a name and select your MP3 file. You can additionally add a Title and an Artist (if applicable). It's highly recommended that you add a Title at least as it will appear on the download link for users who can't play the audio directly.

NOTE: When previewing the page, you will only see the download link since the Flash animation required to play MP3 files isn't available on the www-cms server.

When you place multiple files on one page, they will be linked together so that playing one pauses the others.

Using JavaScript

For PHP applications and pages not in TerminalFour, you can place audio files on pages using JavaScript. First, as above, you'll need to create and upload your MP3 files. Next, create and write an audio file object.

var Track1 = new EnyoAudioPlayer({
	file: "driver.mp3",
	title: "Driver",
	artist: "webOS ringtones"
});
var Track2 = new EnyoAudioPlayer({
	file: "guitar.mp3",
	title: "Guitar",
	artist: "webOS ringtones"
});
var Track3 = new EnyoAudioPlayer({
	file: "passing-by-trees.mp3",
	title: "Passing by Trees",
	artist: "webOS ringtones"
});
Track1.write();
Track2.write();
Track3.write();

Output