首页 > 编程 > HTML > 正文

手机wap站网页播放腾讯视频代码

2024-08-26 00:15:21
字体:
来源:转载
供稿:网友

 

  1. <div class="detail-con clear"> 
  2.                         <div id="mod_player_wrap" class="mod_player_wrap"> 
  3. <div class="mod_inner"> 
  4. <div id="mod_inner" class="mod_player_section center mod_independent"> 
  5. <div> 
  6. <div id="mod_player" class="mod_player"> 
  7. <div id="mod_player_skin">&nbsp;</div> 
  8. <!-- 这个div是播放器准备输出的位置 --><!-- 引入腾讯视频播放器组件 --><script language="javascript" src="http://qzs.qq.com/tencentvideo_v1/js/tvp/tvp.player.js" charset="utf-8"></script><script language="javascript"> 
  9.                         //定义视频对象 
  10.                         var video = new tvp.VideoInfo(); 
  11.                         //向视频对象传入视频vid 
  12.                         video.setVid("c0146k6imdf"); 
  13.                         //定义播放器对象 
  14.                         var player = new tvp.Player(320, 240); 
  15.                         //设置播放器初始化时加载的视频 
  16.                         player.setCurVideo(video); 
  17.                         //设置精简皮肤,仅点播有效 
  18.                         //player.addParam("flashskin", "http://imgcache.qq.com/minivideo_v1/vd/res/skins/TencentPlayerMiniSkin.swf"); 
  19.                         //输出播放器,参数就是上面div的id,希望输出到哪个HTML元素里,就写哪个元素的id 
  20.                         player.addParam("autoplay","1"); 
  21.                         player.addParam("wmode","transparent"); 
  22.                         //player.addParam("pic","http://img1.gtimg.com/ent/pics/hv1/75/182/1238/80547435.jpg"); 
  23.                         player.write("mod_player_skin"); 
  24.                     </script></div> 
  25. </div> 
  26. </div> 
  27. </div> 
  28. </div> 
  29. </div> 

PS:将对应的:
video.setVid("c0146k6imdf");中的vid替换成自己得视频id即可.

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表