<div class="left">
<div class="video" id="CuPlayer" ></div> //给视频定一个外边框,且在js中也要用到class和id
<php>
$video=sp_sql_posts(\'cid:18;field:post_source,smeta;order:listorder asc\');
</php>
<foreach name="video" item="vodio">
<php>$smeta=json_decode($vodio[\'smeta\'],true);</php>
<script type="text/javascript">
var so = new SWFObject("__TMPL__Public/assets/video/player/player.swf","ply","363","248","9","#000000");
so.addParam("allowfullscreen","true");
so.addParam("allowscriptaccess","always");
so.addParam("wmode","opaque");
so.addParam("quality","high");
so.addParam("salign","lt");
so.addVariable("JcScpAutoPlay","no");//是否自动播放,默认Yes
//播放器配置文件-----------------------------
so.addVariable("JcScpFile","__TMPL__Public/assets/video/player/CuSunV3set.xml");//加载xml后辍的配置文件
so.addVariable("JcScpVideoPath","__TMPL__Public/assets/video/<?php echo $vodio[\'post_source\'] ?>"); //视频地址,在后台来源里面(post_source)只写入视频的名称,如(aa.mp4),这种方法可以读到完整的视频路径
so.addVariable("JcScpImg","{:sp_get_asset_upload_path($smeta[\'thumb\'])}");//视频图片、读取视频缩略图
so.write("CuPlayer");
</script>
</foreach>
</div>