I have an app that displays a video using VideoView. The layout consists of a Clock and a VideoView laid out in a simple vertical LinearLayout.
Here's my code snippet that I use:
VideoView mVideoView = new VideoView(this); mVideoView.setVideoPath(myVideoURL); mVideoView.requestFocus(); mVideoView.start();
Since the buffering of the video takes about 8-10 seconds, the layout comes up with the Clock, but the VideoView stays blank. What I want to achieve is this:
-- Display an ImageView for the 10s while the video is buffering -- Detect when the video is ready to be played (onPrepared?) -- Show the Clock and VideoView and start the Video
Anyone have pointers on how to go about this?
Thanks Chris