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

Dynamically generated file not being recognize by file


Testing the JW 6 upgrade and for some reason it will not play this file (or any file delivered this way). Am I missing something? Thanks in advance.
http://www.artistshare.com/media_proxy.aspx?id=23624&ex=.flv&mediaTypeID=4

20 Community Answers

jherrieven

Best Answer 

If it is an FLV file you are trying to play then you'll need to render the player in Flash mode (which then won't work on mobile). This is done by adding the following:

"primary":"flash"

If it's being sent as an MP4 (with the mime-type sent from the server as "video/mp4") it should play fine in HTML5 mode.

You will however need to tell JW Player it is an MP4 because it can't be deduced from the URL. This is done by adding the following to your setup block:

"type":"mp4"

...

James Herrieven

View in conversation

ben1189

User  
0 rated :

provide link where you run this.
I assume you try to use html5 to play flv which is impossible

brian

User  
0 rated :

No HTML 5. The file runs fine if it is a local path but not when it is called dynamically from http://www.artistshare.com/media_proxy.aspx?id=23624&ex=.flv&mediaTypeID=4 which is a "progressive download" link.

brian

User  
0 rated :

PS. I can get it to run in Flowplayer which is our 2nd choice for a player. Would love to get a solution/definitive answer about JWPlayer if possible. Thanks

jherrieven

Best Answer  User  
0 rated :

If it is an FLV file you are trying to play then you'll need to render the player in Flash mode (which then won't work on mobile). This is done by adding the following:

"primary":"flash"

If it's being sent as an MP4 (with the mime-type sent from the server as "video/mp4") it should play fine in HTML5 mode.

You will however need to tell JW Player it is an MP4 because it can't be deduced from the URL. This is done by adding the following to your setup block:

"type":"mp4"

...

James Herrieven

Ethan Feldman

JW Player Support Agent  
1 rated :

Indeed.

However, the link you provided does say “flv” in the path.

I just tried to play it locally and it works in Flash mode fine, not in HTML5 mode.

I am pretty sure this file is a FLV, not an MP4.

brian

User  
0 rated :

Yes, it is a flash file and it plays when downloaded locally and an absolute path on the local machine is specified. It plays fine in other players directly from that link which is why I am wondering if it is a limitation of the JWplayer. Am in correct in assuming that the JWplayer is able to detect and select the proper player HTML5/Flash automatically? I would love to get this resolved and use the player. Thanks in advance for your help. Here is the code we are using to embed the player

jwplayer("myElement").setup({
file: "http://www.artistshare.com/media_proxy.aspx?id=23624&ex=.flv&mediaTypeID=4",
image: "/uploads/myPoster.jpg",
width: 980,
height: 350
});

brian

User  
0 rated :

jwplayer("myElement").setup({
file: "<%=ViewData("MediaFlashVars")%>",
image: "/uploads/myPoster.jpg",
primary:"flash",
width: 980,
height: 350
});

Not working either

brian

User  
0 rated :

Here is the error message

Error loading player:
No playable sources found

Ethan Feldman

JW Player Support Agent  
1 rated :

Under:

file: “<%=ViewData(”MediaFlashVars")%>",

Add:

type: “flv”,

Or, do:

type: “mp4”,

If the file is an mp4.

brian

User  
0 rated :

Great! That did the trick. Is there a way to set the player up to detect flash automatically and compensate for the file? Thanks!

Ethan Feldman

JW Player Support Agent  
0 rated :

If you set type to flv it will always default to flash. You can always set the primary variabkle to flash as well, and have ti fall back to html5 when needed.

brian

User  
0 rated :

Thanks. Setting the primary variable did not work in this case though. I want it to default to mp4 but if no mp4 file is present to default to flash. Possible?

Ethan Feldman

JW Player Support Agent  
0 rated :

Np. Can I see where you are running this? It might be a simple code issue. Also, Flash has supported MP4 for years, since Flash 9.

brian

User  
0 rated :

Sure. What code do you need to see exactly (where you are running this)?

brian

User  
0 rated :

I think I am understanding the issue. Let me rephrase the question. Is it possible to call the correct "player" by reading the file extension of the file and if it requires flash to then use the flash player, but otherwise defaulting to HTML5/mp4?

Ethan Feldman

JW Player Support Agent  
0 rated :

Why even bother with FLV though?

Just use mp4 and Flash and html5 can both play it alike.

brian

User  
0 rated :

We have a huge legacy catalog of flv files awaiting conversion

Ethan Feldman

JW Player Support Agent  
0 rated :

You could always have your code set up like this:

<div id="myElement"></div> <script> jwplayer("myElement").setup({ playlist: [{ image: "/uploads/myPoster.jpg", sources: [{ file: "the_flv", type: "flv" },{ file: "the_mp4", type: "mp4" }] }], primary: "flash" }); </script>

brian

User  
0 rated :

OK. Thanks!

Ethan Feldman

JW Player Support Agent  
0 rated :

Np!

This question has received the maximum number of answers.