Related Articles
- How to use LongTail JW Player 6 with Wowza Media Server
- How to add SecureToken protection to LongTail JW Player 5 and 6
Configuration
Set up JW Player 5 by using one of the following methods:
- Using SWFObject and other methods.
- Using JW Embedder
After you have JW Player working following any of the options, you can configure it for streaming by changing the "file" to a video or live stream that you want to display and adding "streamer" and "provider" Flashvars. For example, if you used the Embed Tag method, you would change this:
Code:
<embed flashvars="file=/data/bbb.mp4" allowfullscreen="true" allowscripaccess="always" id="player1" name="player1" src="player.swf" width="480" height="270" />
Code:
<embed flashvars="file=sample.mp4&streamer=rtmp://localhost:1935/vod&provider=rtmp" allowfullscreen="true" allowscripaccess="always" id="player1" name="player1" src="player.swf" width="480" height="270" />
Code:
<embed flashvars="file=myStream&streamer=rtmp://localhost:1935/live&provider=rtmp" allowfullscreen="true" allowscripaccess="always" id="player1" name="player1" src="player.swf" width="480" height="270" />
Code:
<html>
<head>
<title>JW Player Fallback</title>
</head>
<body>
<script type='text/javascript' src='jwplayer.js'></script>
<div id='mediaplayer'></div>
<script type="text/javascript">
jwplayer('mediaplayer').setup({
'id': 'playerID',
'width': '480',
'height': '270',
'provider': 'rtmp',
'streamer': 'rtmp://[wowza-address]:1935/vod',
'file': 'sample.mp4',
'modes': [
{type: 'flash', src: 'player.swf'},
{type: 'html5', config:
{
'file': "http://[wowza-address]:1935/vod/mp4:sample.mp4/playlist.m3u8",
provider: 'video'
}
}
]
});
</script>
</body>
</html>
- Click here, if you are having problems or would like to discuss this article.
- Leave a comment below, if there is some aspect of this article you would like to see changed or improved.


Article List
Categories
Wowza Media