1.代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>关于腾讯视频播放接口调用</title> <script type="text/javascript" src="swfobject.js"></script> <script type="text/javascript" src="http://qzs.qq.com/tencentvideo_v1/js/tvp/tvp.player.js"></script> </head> <body> <div id="mod_player" ><!-- 这个div是播放器准备输出的位置 --></div> <div id="img"><img src="#" width="340" height="227" onclick="playV()"/></img></div> <script language="javascript"> function playV(){ var video = new tvp.VideoInfo(); //向视频对象传入视频vid video.setVid("m0532apqki0"); var player = new tvp.Player(600, 450); player.addParam("flashskin", "http://imgcache.qq.com/minivideo_v1/vd/res/skins/TencentPlayerMiniSkin.swf"); //设置播放器初始化时加载的视频 player.setCurVideo(video); //输出播放器 player.write("mod_player"); } </script> </body> </html>2.截图