I am trying to use JWPlayer to play videos on my website.
The video file is given as an url from our server, but the thing is the url does not contains any format, since the file is stored as a blob on server side.
So, does anyone know how to solve it? Thanks.
Here is my code as javascript:
function loadVideoByUrlWithSize(elementId, videoUrl, videoThumbnail, width, height) {
jwplayer(elementId).setup({
file : videoUrl,
image : videoThumbnail,
width : width,
height : height
});
}
The JW Player does need to know the extension, but you can also set the type as well in the player setup().
If you are using JW6, under this line:
file : videoUrl,
Add:
type : 'mp4',
For example. If it is a flv, make it flv...
If you are using JW5, under this line:
file : videoUrl,
Add:
provider: 'video',
Hope this helps!
It sounds as if JWPlayer requires the file extension to know how to play the file.
Try url rewriting (.htaccess, iis) and basically append .mp4 (or whatever the file type) to fix the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With