有人可以帮我吗
1.这可以使用YouTube视频链接(例如:http://www.youtube.com/watch?v=T1Wgp3mLa_E)在模拟器上播放YouTube上的视频吗?如果没有,那么为什么呢? 2.如果是,那么如何?
我尝试使用VideoView播放YouTube视频但是
通过logcat命令发送 "Command PLAYER_INIT completed with an error or info PVMFErrCorrupt"
消息。
答案 0 :(得分:1)
视频无法在模拟器上播放。
但它可能在设备上 试试这个..
WebView webview = new WebView(this);
String htmlString = "<html> <body> <embed src=\"youtube link\"; type=application/x-shockwave-flash width="+widthOfDevice+" height="+heightOfDevice+"> </embed> </body> </html>";
webview.loadData(htmlString ,"text/html", "UTF-8");