i wish to play the webview video on full screen mode ...
if my video is start to play means its display and playing with fullscreen mode ..How can i develop these ??? give me any idea ???
if i have to click play button means the video is playing fullscreen mode.
I have used below code:
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);
}
}
}
});
pls give me any suggestion for playing video on full screen ???
In these code video is displayed particular width and height ly...how can i play the full screen mode ???