引入騰訊視頻的播放器組件在頁面直接播放視頻

<div class="vedio_show">
    <div id="mod_player_skin">&nbsp;</div>
<!-- 這個div是播放器準備輸出的位置 --><!-- 引入騰訊視頻播放器組件 -->
<script language="javascript" src="http://qzs.qq.com/tencentvideo_v1/js/tvp/tvp.player.js" charset="utf-8"></script>
    <script language="javascript">
//定義視頻對象
var video = new tvp.VideoInfo();
//向視頻對象傳入視頻vid
video.setVid("c0146k6imdf");
//定義播放器對象
var player = new tvp.Player(300, 230);
//設置播放器初始化時加載的視頻
player.setCurVideo(video);
//設置精簡皮膚,僅點播有效
player.addParam("flashskin", "http://imgcache.qq.com/minivideo_v1/vd/res/skins/TencentPlayerMiniSkin.swf");
//輸出播放器,參數就是上面div的id,但願輸出到哪一個HTML元素裏,就寫哪一個元素的id
player.addParam("autoplay","1");
player.addParam("wmode","transparent");
//player.addParam("pic","http://img1.gtimg.com/ent/pics/hv1/75/182/1238/80547435.jpg");
player.write("mod_player_skin");
</script>
</div>
相關文章
相關標籤/搜索