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

Automatic type detection by MIME-type instead of file extension?


I'm using JW player 6 with the javascript api to play video files from our Sitecore CMS. This CMS serves all media with the extension .ashx from it's database, but with the correct MIME-types in the HTTP-header. JW player however fails to detect the correct media type, resulting in an error message instead of my video.

In JW player 5 I could force the media type to 'video' by using the 'provider' option, but this option isn't available in version 6 anymore. I tried using a playlist and the 'type' option there, but I'm getting JS errors in my console and still no video.

Could you somehow try to detect the media type from MIME-type instead of file extension or do you have another solution for me?

7 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

You should be able to use type to do this in JW6. Do you have a link?

info

User  
0 rated :

I have similar problem.
Would be great to be able force mime-type for at file. (As I suspect this is the problem)

I have created the following example:
http://www.spotonsport.com/test-jwplayer.php

Here it shows, that mime type is correct, but JW player will not play the file.

Ethan Feldman

JW Player Support Agent  
2 rated :

Change:

“file”:“http://videa.hu/static/video/3.835524.1824491”

To:

“file”:“http://videa.hu/static/video/3.835524.1824491”,
“type”:“mp4”

info

User  
0 rated :

thanks

Ethan Feldman

JW Player Support Agent  
0 rated :

Np

rocco.janse

User  
0 rated :

Turns out our problem was something else. The html id of the original <video>-element started with an { and JWplayer didn't like that. (and rightly so, because that's not valid html syntax)

Ethan Feldman

JW Player Support Agent  
0 rated :

Ah, ok, glad you got it.

This question has received the maximum number of answers.