Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Streaming in html5


Hi. Im trying to stream with jwplayer from wowza. Its working now with flash and i want it to work with html5 but i cant get it working.
I have tried several codes/scripts and below is last one, it doesnt work. Can someone point out what im doing wrong and how I can stream in our website html5-based stream.


<script type='text/javascript' src='/jwplayer/jwplayer.js'></script>

<script src="//mywebsite.com/jwplayer/jwplayer.js"></script>
<script>jwplayer.key="key";</script>


<div id='mediaplayer'></div>

<script type="text/javascript">
jwplayer('mediaplayer').setup({
'id': 'playerID',
'width': '480',
'height': '270',
'provider': 'rtmp',
'streamer': 'rtmp://serverIP:1935/stream/name.stream',
'file': 'sample.mp4',
'image': 'http://example.com/thumbs/sample.jpg',
'modes': [
{type: 'flash', src: '/jwplayer/player.swf'},
{
type: 'html5',
config: {
'file': 'http://serverip:1935/stream/name.stream/playlist.m3u8',
'provider': 'video'
}
},
]
});
</script>

Thanks

4 Community Answers

i...

User  
0 rated :

And also. If I put that rtmp or http-link for example in vlc, it works just fine. Error message that comes in player is "error loading media: file could not be played"

Donni

JW Player Support Agent  
0 rated :

If you want to stream in HTML5 use HLS, not RTMP since that is a flash-based format.

i...

User  
0 rated :

Can you tell me how i can do that? I have tried several scripts and I have no idea how i do that.

Donni

JW Player Support Agent  
0 rated :

You already know how, m3u8 is the HLS file extension. Point to that instead of the RTMP link.

Let me know if that helps.

This question has received the maximum number of answers.