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

Setting up jwplayer without specifying a file or playlist


I would like to do the following and then later .load() playlists.

bc.. jwplayer("mainaudio").setup({
height: 30,
width: 400,
primary: "flash",
controls: true
}).onSetupError(fun... etc



but I get an error saying 'No playable sources found', after which calling load() has no effect.

Is this possible or do I have to specify either file or playlist in setup()?

Many thanks

6 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

You need at least one file loaded on the first setup()

JW Player

User  
0 rated :

I agree with Ethan in specifying one file.

You could as a workaround use 'a dummy' file.

For example

bc.. sources:
[
{file:'video/0.mp4'}
]




This would display the JWPlayer with a black background.

*Would be nice IF it is possible to be able to set the JWPlayer's background to 'transparent'.*

Ethan woul dthis be forthcoming in the future?

Ethan Feldman

JW Player Support Agent  
0 rated :

Yeah, I usually use a 5 kb blank mp4 file.

I don’t think we are going to add transparency.

JW Player

User  
0 rated :

Thanks for your responses, I am working with audio and have got a 0.1 second mp3 as a dummy.

The problem I have with this solution is that all other playlists are rss feeds that specify an rtmp and then a http source. Because I have loaded my dummy mp3 first jwplayer seems to ignore the fact that the rtmp source is first in my rss and that I have set the 'primary' option to flash - and will only read the http source.

JW Player

User  
0 rated :

Apologies, ignore my last comment. There was a typo in the Type attribute that I think was causing jwplayer to fallback to http source.

Ethan Feldman

JW Player Support Agent  
0 rated :

Glad you got it.

This question has received the maximum number of answers.