# Streaming to HTML5 audio tag

**URL:** https://community.wowza.com/t/streaming-to-html5-audio-tag/36509
**Category:** Wowza Streaming Engine
**Created:** [July 7, 2011, 4:01pm UTC](https://community.wowza.com/t/streaming-to-html5-audio-tag/36509 "2011-07-07T16:01:35Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Arian\_Amiri](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@Arian\_Amiri](https://community.wowza.com/u/Arian_Amiri)
#### Post date: [July 7, 2011, 4:01pm UTC](https://community.wowza.com/t/streaming-to-html5-audio-tag/36509/1 "2011-07-07T16:01:35Z")

</div>

Hi. I want to stream an mp3 to html5 audio tag. How to i do this? Is it the same procedure as with the video tag?

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [July 7, 2011, 9:19pm UTC](https://community.wowza.com/t/streaming-to-html5-audio-tag/36509/2 "2011-07-07T21:19:45Z")

</div>

Use the video tag and mp3: prefix

```auto
<video controls src="http://[wowza-address]:1935/vod/mp3:song.mp3/playlist.m3u8">

```

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [August 23, 2011, 11:20am UTC](https://community.wowza.com/t/streaming-to-html5-audio-tag/36509/3 "2011-08-23T11:20:14Z")

</div>

You can re-stream Shoutcast in Wowza, and that can be played back in iOS. Use the video (not audio) tag and a .stream file in, and start the shoutcast stream in StreamManager with MediaCaster type “shoutcast”. The Application.xml /StreamType should be “live” instead of “shoutcast” in this case. Playback URL for iOS is something like :

```auto
http://[wowza-address]:1935/shoutcast/station1.stream/playlist.m3u8

```

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [October 10, 2011, 12:32pm UTC](https://community.wowza.com/t/streaming-to-html5-audio-tag/36509/4 "2011-10-10T12:32:57Z")

</div>

Nui,

Use javascript video.play()

Take a look at this example for reference:

[https://www.wowza.com/docs/how-to-do-pre-roll-and-playlist-for-ios-a-client-side-work-around](https://www.wowza.com/docs/how-to-do-pre-roll-and-playlist-for-ios-a-client-side-work-around)

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [November 30, 2011, 9:47pm UTC](https://community.wowza.com/t/streaming-to-html5-audio-tag/36509/5 "2011-11-30T21:47:38Z")

</div>

Use RTSP on Android all versions

You can use Flash RTMP and Flash HTTP on Android 2.2+

Make sure the audio is AAC. MP3 is not supported on Android as far as I know

Richard

---

<div class="post-metadata">

### Author: ![Tero\_Tiainen](https://avatars.discourse-cdn.com/v4/letter/t/3e96dc/32.png) [@Tero\_Tiainen](https://community.wowza.com/u/Tero_Tiainen)
#### Post date: [August 23, 2011, 1:09pm UTC](https://community.wowza.com/t/streaming-to-html5-audio-tag/36509/6 "2011-08-23T13:09:03Z")

</div>

Should shoutcast stream work for video and/or audio tag for HTML as well?

---

<div class="post-metadata">

### Author: ![Randall\_Auriemma](https://avatars.discourse-cdn.com/v4/letter/r/85e7bf/32.png) [@Randall\_Auriemma](https://community.wowza.com/u/Randall_Auriemma)
#### Post date: [November 30, 2011, 5:54pm UTC](https://community.wowza.com/t/streaming-to-html5-audio-tag/36509/7 "2011-11-30T17:54:41Z")

</div>

You can use MP3 in Flash on Android. You just can’t use MP3 with apps that were built using the Android SDK.

---

<div class="post-metadata">

### Author: ![a\_a1](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@a\_a1](https://community.wowza.com/u/a_a1)
#### Post date: [October 9, 2011, 9:03pm UTC](https://community.wowza.com/t/streaming-to-html5-audio-tag/36509/8 "2011-10-09T21:03:29Z")

</div>

I want player auto play.

I used

It don’t auto play.

How should I solve the problem?

Thank

Nui

---

<div class="post-metadata">

### Author: ![Daren\_Johnson](https://avatars.discourse-cdn.com/v4/letter/d/ee59a6/32.png) [@Daren\_Johnson](https://community.wowza.com/u/Daren_Johnson)
#### Post date: [October 23, 2012, 3:06pm UTC](https://community.wowza.com/t/streaming-to-html5-audio-tag/36509/9 "2012-10-23T15:06:16Z")

</div>

HLS isn’t supported by the client you listed. It is supported by iOS and android \>= 3.0 and OSX with Safari, but not supported by IE9 or Chrome.

For the later two use flash player and the rtmp url.

It’s best to use the user agent string to detect all the different cases and act accordingly.

- Daren

---

<div class="post-metadata">

### Author: ![Vincenzo\_Basirico](https://avatars.discourse-cdn.com/v4/letter/v/3ec8ea/32.png) [@Vincenzo\_Basirico](https://community.wowza.com/u/Vincenzo_Basirico)
#### Post date: [November 30, 2011, 10:22pm UTC](https://community.wowza.com/t/streaming-to-html5-audio-tag/36509/10 "2011-11-30T22:22:53Z")

</div>

> You can re-stream Shoutcast in Wowza, and that can be played back in iOS. Use the video (not audio) tag and a .stream file in, and start the shoutcast stream in StreamManager with MediaCaster type “shoutcast”. The Application.xml /StreamType should be “live” instead of “shoutcast” in this case. Playback URL for iOS is something like :
> 
> ```auto
> http://[wowza-address]:1935/shoutcast/station1.stream/playlist.m3u8
> 
> ```
> 
> Richard

Hi Richard,

Do you know how you can do the same for Android, but for audio, please ?

I’ve do for iOS http://[wowza-address]/streamname.m3u and work well. But for Android ?

---

<div class="post-metadata">

### Author: ![Joe\_Bowen](https://avatars.discourse-cdn.com/v4/letter/j/919ad9/32.png) [@Joe\_Bowen](https://community.wowza.com/u/Joe_Bowen)
#### Post date: [October 23, 2012, 12:08pm UTC](https://community.wowza.com/t/streaming-to-html5-audio-tag/36509/11 "2012-10-23T12:08:06Z")

</div>

I’m working the same issue, playing an audio-only stream, but cannot get a successful play of an audio stream. I’m encoding with Flash Encoder to an mp3, and using this player

```auto
		<div>
                Video Player example <br />
                <video controls="controls" width="320" height="60" >
                	<source src="http://ServerIP:1935/live/mp3:myStream/playlist.m3u8" 
                    	type="audio/mpeg" />
                </video>
                </div>

```

I get a connect and create myStream from the Wowza server, but when I mouse over the play button in the video player, it goes grey, and will not play. Some 15 seconds later, Wowza destroys the stream and disconnects.

I am using Chrome on Windows. This has got to be something simple.

Joe
