2013-08-06 47 views
0

有一個嵌入視頻和顯示它的android活動的要求。 以下是代碼:從你的視頻嵌入視頻管不工作

....Some Code 

    viewHolder.webView.loadData("<html><body>" + embedcode + "</body></html>","text/html", "utf-8"); 
    viewHolder.webView.setTag("<html><body>" + embedcode + "</body></html>"); 

...Some code 

凡「embedcode」 ID例如

<iframe width="560" height="315" src="//www.youtube.com/embed/MCCVVgtI5xU" frameborder="0" allowfullscreen></iframe> 

有though..when我查看使嵌入代碼的TEDx它工作得很好 防爆一個問題:

<iframe src="http://embed.ted.com/talks/eli_beer_the_fastest_ambulance_a_motorcycle.html" width="560" height="315" frameborder="0" scrolling="no" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe> 

但是,當我從你的視頻管tubent工作。 我認爲這是由於在i幀的src中缺少「http:」協議。 請幫忙

在此先感謝。

+0

也許是標記問題。嘗試編寫像這樣嵌入: String embed =「