开发者

JW player relative path problem

i am using jwplayer on my site but the problem is that i cant play the video...there is an error.....access denied and then it shows the flv files path........

i am cofused how to use the relative path for player and flv files..... i am using windows hosting and here is the link to my video page link text

and here is the code i am using

<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="400" height="315">
        <param name="movie" value="http://www.parasfoundation.com/player.swf" />
        <param name="allowfullscreen" value="true" />
        <param name="allowscriptaccess" value="always" />
        <param name="flashvars" value="file=../media/para开发者_开发知识库s2.flv&image=media/preview1.jpg" />
        <embed
            type="application/x-shockwave-flash"
            id="player2"
            name="player2"
            src="player.swf" 
            width="400" 
            height="315"
            allowscriptaccess="always" 
            allowfullscreen="true"
            flashvars="file=http://www.parasfoundation.com/media/paras2.flv&image=media/preview1.jpg" 
        />

first i was using the path for the file like this

flashvars="file=media/paras2.flv&image=media/preview1.jpg" 

and it was working fine locally on my WAMP server....but when i uploaded it the video doesn't play


I have found the issue, i think you need to add a mime type in your IIS server by going to website control panel

Type ".flv" as the associated extension and "video/x-flv" as the content type.

and this works for me.....


Start your relative path from the player.swf location!

example

player path:    resources/plugins/jwplayer/player.swf
video  path:    resources/videos/video.flv

so relative path is

../../videos/video.flv


make a folder called videos with a subfolder called videos then put the player.swf,the swobject.js, and your playlist.xml in the 1st folder and your flv videos in the subfolder.

This text will be replaced var so = new SWFObject('video/player.swf','mpl','530','640','9'); so.addParam('allowscriptaccess','always'); so.addParam('allowfullscreen','true'); so.addParam('flashvars','&file=video/videos.xml&backcolor=000000&frontcolor=ffffff&playlistsize=220&repeat=list&autostart=true&playlist=bottom'); so.write('player');
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜