Using HLS urls in playlist with jwplayer6


JW Player is has been a great online video player. It has both Flash and HTML5 implementation supporting most of the streams like rtmp, HLS. Here in this post, I am going to show you how you can use jwplayer with a playlist which will have hls streams. My playlist for the player is hls playlist.rss which is as follows:

<rss version='2.0' xmlns:jwplayer='http://rss.jwpcdn.com/'>
<channel> <item>
<title></title>
<description></description>


<jwplayer:image>http://dvtvonline.com/uploads/video_thumbs/1384483889_Episode7TheStickySituation.mp4.mp4.jpg</jwplayer:image>
<jwplayer:source file='http://barakyah.videocdn.scaleengine.net/barakyah-vod/play/sestore1/barakyah/dvtv/1384483889_Episode7TheStickySituation.mp4.mp4/playlist.m3u8' />
</item> <item>
<title></title>
<description></description>
<jwplayer:image>http://dvtvonline.com/uploads/video_thumbs/1384484872_KingdomChoiceAwards2013.mp4.mp4.jpg</jwplayer:image>
<jwplayer:source file='http://barakyah.videocdn.scaleengine.net/barakyah-vod/play/sestore1/barakyah/dvtv/1384484872_KingdomChoiceAwards2013.mp4.mp4/playlist.m3u8' />
</item>
</channel>
</rss>

And my player implementation is as follows:
<div id="myElement" width="666" height="354"></div>
<script src="http://jwpsrv.com/library/ePtfwBmkEeO2kCIACusDuQ.js"></script>
<script type="text/javascript">jwplayer.key="7mIMDWJff/le/p6rGBEp5/U8ZlgerS/azdO/GMh7sI73e9jxJwcIOfCYHDU=";</script>
<script>
jwplayer("myElement").setup({
playlist: "hlsplaylist.rss",
height:447,
width:940,
listbar: {
position: 'right',
size: 200
},
});
</script>

Please use your own premium license key to make this work in your own domain. The above player works fine in ios devices. 

Comments

Popular posts from this blog

Automate file upload in Selenium IDE

How To Install and Configure Nextcloud