I'm looking to get an embedded player to always play the latest videos from an RSS feed. So if the RSS feed content has updated, I want the playlist to update.
The basic way to do this is a META refresh on the page, but hoping for a neater solution.
I thought I might be able to set a timeout in javascript to either reload the player, or get it to load the playlist again. I tried this but it just causes a "No playable sources found" error;
function refreshPL() { jwplayer("jwplayer-0").load("first/url/here"); jwplayer("jwplayer-0").play(true); jwplayer("jwplayer-1").load("second/url/here"); jwplayer("jwplayer-1").play(true);
setTimeout("refreshPL()",40000); } </script>
When refreshPL() runs both players load the playlist but only one starts playing but a few seconds into the first video. I can click play and get them going again but I don't want that to be necessary. If I remove that refresh function the players work as expected, looping the playlists.
You still need to setup your player before you begin binding events and calling .load on it:
jwplayer(“jwplayer-0”).setup({
file: ‘bunny.mp4’,
title: ‘Bunny’,
image: ‘bunny.jpg’,
width:‘100%’
});