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

Dynamically loading playlist


I am trying to create a dynamic loading playlist. The way it works is that I have a looping playlist running a "slate" that runs for 10 seconds then repeats. After each time it completes there is a function that checks if there are any changes in the playlist. To further complicate things I want the playlist in an rss format.

here is what I have:

jwplayer('playercontainer').setup({
playlist: 'http://localhost:8888/gcdev/playlisteng.rss',
repeat: true,
width: '1280',
height: '720',
aspectratio: '16:9',
androidhls: true
});

jwplayer('playermukFcrAGIdgW').onComplete(function() {
var random_num = Math.floor((Math.random() * 1000) + 1);
jwplayer('playercontainer').load("http://localhost:8888/gcdev/playlisteng.rss?nocache="+random_num);
});

Now when the item completes every 10 seconds it runs the command just fine (tested with a few console.log()s) but I get an error "error loading playlist: no playable sources found" when I make changes to the playlist containing an HLS live stream (m3u8). If I immediately refresh the page it works just fine. If I use another mp4 video it works fine without the refresh.

Is there a way to mix formats or do they all have to be m3u8 files? or something else I dont know of.

Thanks,

8 Community Answers

jherrieven

User  
0 rated :

Try forcing flash mode by adding "primary":"flash".

If the first item in a playlist is MP4 then the player will initially render in HTML5 mode, however HLS on desktop requires Flash mode (and a premium licence).

It won't dynamically switch between modes - this is one of the exciting improvements coming in JW7!

James Herrieven

mark

User  
0 rated :

It won't dynamically switch between modes - this is one of the exciting improvements coming in JW7!

How do you know that

jherrieven

User  
0 rated :

Hi Mark - An early version of JW7 was demoed at JW Insights this week and that feature was disclosed, along with complete CSS styling capabilities, comprehensive listbar updates (removal!) and a new API framework.

There is a beta program available which you can signup for. Check out these pages:

http://jw7beta.jwplayer.com/
http://jw7beta.jwplayer.com/dash.html?file=1
http://jw7beta.jwplayer.com/mobile.html
http://jw7beta.jwplayer.com/skins.html
https://github.com/jwplayer/jwplayer/wiki

James

mark

User  
0 rated :

Thanks James, signed up on the link because I cant wait any longer.

rbalhorn

User  
0 rated :

hmm the primary flash thing didn't work. Now I get a playlist could not be loaded, crossdomain denied. If I refresh the page, the playlist plays just fine. whats stranger is the playlist is locally stored. The HLS live stream is not stored locally, but again, if I just refresh the page it plays just fine.

rbalhorn

User  
0 rated :

I also tried converting the mp4 to HLS so both the slate and event are both HLS. It plays, but when its done it gives the same error as above: "crossdomain denied", even if I dont change the playlist (so its playing the same source same playlist).

It has a hard time reloading the playlist file in general after playing an HLS item. If I change it to just mp4 files, it works fine.

Carolyn Ganon

JW Player Support Agent  
0 rated :

Hello,

Your player setup looks correct. Do you have a premium account type? HLS is only enabled on Premium licenses.

rbalhorn

User  
0 rated :

I have an enterprise account actually.

This question has received the maximum number of answers.