enyo.kind({
	name: "testr.Audio",
	kind: "Control",
	published: {
		src: "",
		preload: true
	},
	tag: "audio",
	create: function() {
		this.inherited(arguments);
		this.srcChanged();
		this.preloadChanged();
	},
	srcChanged: function() {
		var path = enyo.path.rewrite(this.src);
		this.setAttribute("src", path);
		this.setAttribute("type", "audio/wav");
	},
	preloadChanged: function() {
		this.setAttribute("autobuffer", this.preload ? "autobuffer" : null);
		this.setAttribute("preload", this.preload ? "preload" : null);
	},
	play: function() {
		if (this.hasNode()) {
			if (!this.node.paused) {
				this.node.currentTime = 0;
			} else {
				this.node.play();
			}
		}
	}
});

enyo.kind({
	name: "Html5Audio",
	layoutKind: "FittableRowsLayout",
	palm: false,
	components:[
		{kind: "Signals", ondeviceready: "deviceready"},
		{
			kind: "onyx.Toolbar",
			style: "line-height: 36px;",
			components:[
				{ content: "HTML5 Audio Test" },
			]
		},
		{
			kind: "Scroller",
			touch: true,
			horizontal: "hidden",
			fit: true,
			components: [
				{style: "margin-left: auto; margin-right: auto; max-width: 35em; padding: 1rem;", components: [
					{kind: "onyx.Groupbox", components: [
					    {kind: "onyx.GroupboxHeader", content: "Sounds"},
						{components: [
							{content: "Clicking the button below will play a alarm audio sound to verify that HTML 5 Audio support is working correctly. If you don't hear anything the test has failed.", style: "padding: 5px; color: white"},
							{name: "AudioPlayer", kind: "testr.Audio", preload: false, src: "file:///usr/palm/sounds/alert.wav"},
							{kind: "onyx.Button", style: "width: 100%", content: "Play", ontap: "playAudio"}
						]},
					]},
				]}
			]
		},
	],
	create: function(inSender, inEvent) {
		this.inherited(arguments);
		if(!window.PalmSystem)
			enyo.log("Non-palm platform, service requests disabled.");
	},
	deviceready: function(inSender, inEvent) {
		this.inherited(arguments);
		this.palm = true;
	},
	playAudio: function () {
		this.$.AudioPlayer.play();
	}
});

@@ -232,16 +232,19 @@
 ion() %7B%0A
+%09%09%0A
 %09%09var pa
@@ -311,16 +311,154 @@
  path);%0A
+%09%09//Type needs to be set based on the filetype. Assuming for now it's always wav or mp3, so last 3 chars should work (though a bit dirty)%0A
 %09%09this.s
@@ -484,20 +484,47 @@
  %22audio/
-wav%22
+%22+path.substring(path.length-3)
 );%0A%09%7D,%0A%09
@@ -1511,16 +1511,30 @@
 o sound 
+in WAV-format 
 to verif
@@ -1697,16 +1697,19 @@
 ioPlayer
+WAV
 %22, kind:
@@ -1848,16 +1848,474 @@
 t: %22Play
+ WAV%22, ontap: %22playAudio(%5C%22WAV%5C%22)%22%7D,%0A%09%09%09%09%09%09%09%7Bcontent: %22Clicking the button below will play a ringtone audio sound in MP3-format to verify that HTML 5 Audio support is working correctly. If you don't hear anything the test has failed.%22, style: %22padding: 5px; color: white%22%7D,%0A%09%09%09%09%09%09%09%7Bname: %22AudioPlayerMP3%22, kind: %22testr.Audio%22, preload: false, src: %22file:///usr/palm/sounds/ringtone.mp3%22%7D,%0A%09%09%09%09%09%09%09%7Bkind: %22onyx.Button%22, style: %22width: 100%25%22, content: %22Play MP3
 %22, ontap
@@ -2635,16 +2635,19 @@
 layAudio
+WAV
 : functi
@@ -2674,16 +2674,19 @@
 ioPlayer
+WAV
 .play();
@@ -2688,13 +2688,79 @@
 ay();%0A%09%7D
+,%0A%09playAudioMP3: function () %7B%0A%09%09this.$.AudioPlayerMP3.play();%0A%09%7D%0A
 %0A%7D);%0A

Add test case for MP3