![](https://secure.gravatar.com/avatar/debb6181281d3bee5f626a4dcd0067ae?rating=PG&size=50&default=https%3A%2F%2Fcdn.desk.com%2Fassets%2Funknown_user_50-8ad5644bbe6b1bd7454f2ea465f782bd.png)
Can i get an example of the code used to mimick live tv
Have tried using this one, but its not working out
script type="text/javascript">
jwplayer("container").setup({
playlist: "http://content.jwplatform.com/feeds/DrqpQIzP.rss",
controls: "false"
});
jwplayer().onDisplayClick(function() {
jwplayer().pause();
});
jwplayer().onReady(function() {
var seconds = new Date().getMinutes()*60 + new Date().getSeconds();
var playlist = this.getPlaylist();
var offset = 0;
for (var index=0; index < playlist.length; index++) {
var duration = Math.round(playlist[index]['duration']);
if(offset + duration > seconds) {
this.playlistItem(index);
this.seek(seconds-offset);
break;
} else {
offset += duration;
}
}
});
</script>
Please, if you have any, can you give me to copy. I have a playlist with 29 videos, which i want to play between 12am and 12pm, one after the other, in TV format.