Youtube网址没有使用android webview

时间:2014-01-08 19:31:26

标签: android html webview

在我的混合基础android应用程序中,当我在webview中加载以下嵌入代码时,音频只会出现并且屏幕显示空白屏幕,这里是html代码,

<tr>
 <td width="20%" class="dr"><strong>Wk 0 Tues</strong></td>
 <td width="40%">Three surprising reasons to pray</td>
 <td width="20%" > <a href="#this-video-1" id="video1" data-rel="popup" data-position-to="window"  data-transition="pop" style="color:#fff" >VIDEO</a></td>
</tr>
<div data-role="popup" id="this-video-1" data-overlay-theme="a" data-theme="c" data-dismissible="false" class="ui-content">
<a href="#" data-rel="back" data-role="button" data-theme="f" data-icon="delete" data-iconpos="notext" class="ui-btn-right" id='close1'>Close</a>
<div id="video-holder">
<object id="raj" width="100%"  height="250" type="text/html" data="http://www.youtube.com/embed/2qzxf0B0byA">Unable to play video. Please check your internet connection. 
</object>
</div>
</div>

一起显示音频和视频需要进行哪些更改。

1 个答案:

答案 0 :(得分:0)

调用WebView.setWebChromeClient(new WebChromeClient());在您的WebView实例上。