Problem embedding video from URL
Hi,
I have a problem embedding JW Player.
I'd want to play a video from a URL, not a direct file url.
The video returned by the server is correctly encoded (it plays fine if I save it on the webserver and point directly to the file) and the mime type is right ("video/mp4").
JW Player gives me the error "Error loading player: No playable sources found".
I tried to add a fake parameter to the url (it seems that JW Player needs the file extension in the url) but than JW Player gives me the error "Error loading media File not found".
The url is like:
http://testserver/site/GetFile.aspx?guid=e9cca5d5-7224-4650-9458-e8f8621db9d5&chset=caddfc97-87d2-47fc-b146-62c7ff935ba4
Any idea?
Here's the javascript code:
bc.. function PlayIt( vid, byline, caption )
{
var ic = document.getElementById( 'image-container' );
var vd = document.getElementById( 'video-container' );
ic.style.display = 'none';
document.getElementById( 'byline' ).innerHTML = byline;
document.getElementById( 'caption' ).innerHTML = caption;
/* setel pideo na */
vd.style.display = 'inherit';
jwplayer.key="MY_PLAYER_KEY";
jwplayer("video-container").setup({
file: encodeURIComponent(vid+"&etx=.mp4"),
width: "100%",
aspectratio: "16:9",
responsive: "yes",
autostart: true
});
}
Many thanks