把騰訊視頻嵌入到html中


--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 

 淘寶店鋪:

             

 【慕色輕熟風女裝】,點擊鏈接再選擇瀏覽器打開 http://c.b1yt.com/h.NvPrs9?cv=tOYO0bf4asx&sm=550d3e 

 ,或復制這條信息¥tOYO0bf4asx¥后打開 手機淘寶
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

想要在網頁中嵌入優酷、土豆、愛奇藝的視頻很簡單,但是現在將騰訊視頻嵌入網頁后卻不能正常顯示,而騰訊視頻現在的資源也越來越多,想直接將騰訊視頻嵌入到網頁中怎么操作呢?其實只需要一段代碼就可以了。

首先,提供一個騰訊視頻嵌入網頁代碼。我們只需替換這段代碼的一部分就可以了。

<p style="text-align: center"><iframe class="video_iframe" style="z-index:1;" src="http://v.qq.com/iframe/player.html?vid=t01662frswa&amp;width=500&amp;height=375&amp;auto=0" allowfullscreen="" frameborder="0" height="375" width="500"></iframe></p>

找到一段騰訊視頻,比如地址:

http://v.qq.com/boke/page/d/0/i/d0163kxz8di.html

這是一段《工業機器人工作場景》的視頻,將這個網址的藍色部分,替換到上面給出的代碼中的紅色部分,就可以了。

最終效果為:

<p style="text-align: center"><iframe class="video_iframe" style="z-index:1;" src="http://v.qq.com/iframe/player.html?vid=d0163kxz8di&amp;width=500&amp;height=375&amp;auto=0" allowfullscreen="" frameborder="0" height="375" width="500"></iframe></p>

把vid參數從騰訊視頻網頁查找

想將優酷視頻、土豆視頻、新浪視頻等網站的視頻調用到個人網站上面的方法非常簡單,這些網站,均提供了直接調用的代碼。如下圖所示:

1、優酷網

youku.jpg

2、土豆網

tudou.jpg

3、新浪視頻

xinlang.jpg

但是騰訊視頻則是這樣的(並沒有提供嵌入網頁的代碼):

tengxun.jpg

應該怎么辦呢?

可以從微信公眾平台中學習一下,因為騰訊視頻,可以直接嵌入微信公眾平台啊?點擊查看:微信公眾平台轉載別人發的視頻的方法

方法一:將視頻在微信公眾平台中的調用代碼提取出來,如下所示:

<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>

效果參見下方:

 

其中的視頻的寬度(width)和高度(height)可以分別通過修改代碼中對應的數值(本視頻中width=300,height=200)來進行修改。

不自動播放

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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM