Hi All,
I am developing an AIR application which can <b>play videos from local directory</b> as well as from server or Youtube. I am using JW Flash player for that.
I am able to play videos from server or Youtube, but when I give the path(relative to HTML page containing player). It gives an error: "Video not found: video.flv"
where video.flv is the video file that I am trying to play. And the video & HTML page are in the same directory.
<b>Please help me out in playing videos from local directory.</b>
Code Snippet is as follows:
<script type="text/javascript" src="swfobject.js"></script>
<script type='text/javascript' src='/embed/swfobject.js'></script>
<div id='preview'>This div will be replaced</div>
<script type='text/javascript'>
var s1 = new SWFObject('player.swf','ply','320','200','9','#ffffff');
s1.addParam('allowfullscreen','true');
s1.addParam('allowscriptaccess','always');
s1.addParam('wmode','opaque');
s1.addParam('flashvars','file=video.flv');
s1.write('preview');
</script>
Please see the Tutorial linked at the top of this page titled Embedding Flash. The section titled Flashvars problems explains that the relative path for FLV video container files begins at the location of the movie.