腾讯视频嵌入网页的方法

来源:互联网 发布:珠海生活 知乎 编辑:程序博客网 时间:2024/05/16 00:40

方法一:将视频在微信公众平台中的调用代码提取出来,如下所示:

<iframe class="video_iframe" style=" z-index:1; " src="http://v.qq.com/iframe/player.html?vid=m0137rrajuc&amp;width=300&amp;height=200&amp;auto=0" allowfullscreen="" frameborder="0" height="200" width="300"></iframe>

打开需要添加的腾讯视频网址,例如:http://v.qq.com/cover/z/zrxyhghf3n8xhxl/k0015trfczz.html

将上述代码中的vid=后面的内容替换成上述网址中标红的部分,然后将上述网址重新复制出来:

<iframe class="video_iframe" style=" z-index:1; " src="http://v.qq.com/iframe/player.html?vid=k0015trfczz&amp;width=300&amp;height=200&amp;auto=0" allowfullscreen="" frameborder="0" height="200" width="300"></iframe>



<iframe class="video_iframe" style="z-index:1;" src="http://v.qq.com/iframe/player.html?vid=r01470ea0hv&width=656&height=470&auto=0" allowfullscreen="" frameborder="0" height="470" width="656">
</iframe>

效果参见下方:

其中的视频的宽度(width)和高度(height)可以分别通过修改代码中对应的数值(本视频中width=300,height=200)来进行修改。



*****************************************************************************************************************************************************

 <div class="video-player">
                            <object width="500" height="400" type="application/x-shockwave-flash" data="//imgcache.qq.com/tencentvideo_v1/player/TencentPlayer.swf?vid=j0019dptog1&amp;autoplay=1&amp;tpid=0"><param value="//imgcache.qq.com/tencentvideo_v1/player/TencentPlayer.swf?vid=j0019dptog1&amp;autoplay=1&amp;tpid=0" name="movie"><param name="wmode" value="transparent"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><param name="flashvars" value="autoplay=0&amp;adplay=1"></object>
                            <div class="video-title">陈坤:看风水请找陈大师</div>
                          </div>

0 0
原创粉丝点击