Wowza Community

How to play live stream on mobile devices with html5 video tag?

Still having slight issue streaming to mobile devices.

Desktop viewers are getting video from http://[IP]:1935/Live/ngrp:[STREAM]_all/jwplayer.smil and it works great. Viewer can even change quality.

On mobile I tried giving rtsp link, but android users dont’ get audio, while iOS devices work fine.

Now I am trying to setup html5 video tag player that will take single quality (I don’t think multiple bitrate will work for this) stream like following http://[IP]:1935/Live/mp4:[STREAM]/playlist.m3u8 or http://[IP]:1935/Live/mp4:[STREAM] but neither work.

<video id="live"  autoplay controls>
	<source src="http://[IP]:1935/Live/mp4:[STREAM]/playlist.m3u8" type="video/mp4" />
	<source src="http://[IP]:1935/Live/mp4:[STREAM]" type="video/mp4" />
<video>

Any tips?

Hi there,

What is the audio codec and sample rate of the stream?

For HTML5 you can use a playlist.m3u8 url (Cupertino stream) in a HTML5 video tag, but only on iOS devices, or Safari on Mac Snow Leopard or higher.

Does this URL work?

<video controls>
<source controls src="http://[IP]:1935/Live/mp4:[STREAM].mp4/playlist.m3u8"/> 
</video>

Salvadore

I don’t have an Android to test, but you could take that and try it with stream from your Wowza server using a playlist.m3u8 url.

Richard

Great, thanks for the update.

Richard

Okay this does work on iOS, MacOS, and Safari.

How about playing live stream using html5 video tag on android?

I have seen other website play live stream using html5 video tag.

Edit. Here is an example of working live stream via html5 video tag.

<video x-webkit-airplay="allow" alt="Calvary Worship Center" width="520" height="292" src="http://f.wa.edge.christianworldmedia.com:1935/calvarylivestream/mp4:calvarylivestream/playlist.m3u8" autoplay controls poster="http://www.christianworldmedia.com/screencap919"></video>

Opening url gives proper playlist.m3u8 file from wowza. If I replace the url to my server, the player doesnt work.

I don’t have an Android to test, but you could take that and try it with stream from your Wowza server using a playlist.m3u8 url.

Richard

That’s what I did. The player doesn’t work, but I think it might be because I am using mp3.

However I have no luck streaming with aac or using transrate with mp3->aac transcode

For whatever reason I thought html5 video tag can play video with mp3 audio. Well it can’t.

After changing audio to AAC I was able to play live stream using html5 video tag.

Also, ngrp: does work with HTML5.

<video controls>
<source controls src="http://[IP]:1935/Live/ngrp:[STREAM]_all/playlist.m3u8"/> 
</video>

Salvadore