I am using a simple webview in my android app, and giving a simple url of youtube video,the problem which i am facing sometime is, the video thumbnail icon appears, when i click on the icon it starts buffering and continuously showing a grey sceen(buffering/ progress bar), and there is no audio or video is there.
But after sometime it again shows the thumbnail icon of that video(it means the video has ended) This problem occurs some times.No video or audio is there, just seeing a grey screen, and it is showing that something is buffering.
I have tested this on the Nexus and Samsung Tab 2.
This is what I've done so far:
webView.setLaysetLayoutParams(new LayoutParams(200,200));
webView.loadUrl(youtubeurl);
mainLayout.addview(webView);
I am setting webview width and height and x and y position of webView in the parent layout dynamically, and then adding the URL to play inside the webView. The problem is sometimes it is showing a grey screen.
Has anyone had the same problem?