0
我要玩網頁視圖視頻全屏模式...視頻播放全屏模式在android系統
如果我的視頻開始播放意味着它的顯示和使用全屏模式下玩我..How可以開發這些???給我任何想法?
如果我必須點擊播放按鈕表示視頻正在播放全屏模式。
我用下面的代碼:
content.setWebChromeClient(new WebChromeClient());
final Activity activity = this;
content.setWebChromeClient(new WebChromeClient(){
public void onProgressChanged (WebView view , int progress){
activity.setProgress(progress * 1000);
}
});
content.setWebViewClient(new WebViewClient(){
public void onReceivedError (WebView view , int errorCode , String description , String failingUrl){
Toast.makeText(activity, "Oh no! " + description, Toast.LENGTH_SHORT).show();
}
});
content.setWebChromeClient(new WebChromeClient());
content.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
content.getSettings().setJavaScriptEnabled(true);
content.getSettings().setDomStorageEnabled(true);
content.getSettings().setPluginState(PluginState.ON);
content.loadDataWithBaseURL(null, full_content, "text/html", "utf-8", null);
content.setWebChromeClient(new WebChromeClient()
{
public void onProgressChanged (WebView view , int progress)
{
activity.setProgress(progress * 1000);
}
public void onShowCustomView(View view, int requestedOrientation, WebChromeClient.CustomViewCallback callback){
super.onShowCustomView(view, callback);
if(Build.VERSION.SDK_INT >=14) {
if (view instanceof FrameLayout) {
content.addView(view, new FrameLayout.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT,
Gravity.CENTER));
content.setVisibility(View.VISIBLE);
}
}
}
});
請給我一個完整的屏幕上播放視頻的任何建議???
在這些代碼視頻顯示特定的寬度和高度ly ...我如何播放全屏模式?