Reputation: 7612
I have an web app that is running on localhost for now.
I have one flv file and one mp4 file in a virtual directory (these files are processed using FFMPEG) I have JW Player set to run in HTML5 by default.
When I point the src to the flv file it plays fine. But if I change the video's src to the mp4 file in the same directory it gives me this error on both FF and Chrome
The video could not be loaded, either because the server or network failed or because the format is not supported: http://localhost/files/john/test video.mp4undefined
What I am doing wrong? Please help.
Here is my code:
<video id="container" src="http://localhost/files/john/test video.mp4" width="640" height="360" type="video/mp4"></video>
<-- gives error
<video id="container" src="http://localhost/files/john/test video.flv" width="640" height="360"></video>
<-- works
jwplayer('container').setup({
'autostart': 'false',
'flashplayer': '../../../../Content/jw/player.swf',
'id': 'JWP',
'width': '640',
'height': '360',
'controlbar.position': 'bottom',
'controlbar.idlehide': 'false',
'screencolor': '#000000',
'events':
{
//all callbacks here
},
'stretching': "exactfit",
'modes': [
{ type: "html5" },
{ type: "flash", src: "../../../../Content/jw/player.swf" },
{ type: "download" }
],
'skin': "../../../../Content/jw/skins/Papon/Papon.zip",
'logo.file': "../../../../Content/jw/logo.png",
'logo.hide': false,
'logo.link': encodeURI('site url'),
'logo.margin': 3,
'logo.position': "bottom-left",
'logo.out': 0.33
});
Upvotes: 1
Views: 1379