VideoView onResume loses buffered portion of the video

I’ve spent several hours trying to hack the original VideoView source code and Now I can confirm VideoView can be hacked to behavior what you want – retain buffering after surface destroyed. I’ve tested on my Samsung Galaxy S2, which works as expected, in my case, the video buffering (streaming m4v video from remote http … Read more

how to create custom UI for android MediaController

I had the same problem on a recent project and ended up creating a custom implementation based on the stock MediaController. It adds a fullscreen button at the far right, but even if that’s not what you want this class should be a good starting point. Code: VideoControllerView.java – http://pastebin.com/1V63aVSg media_controller.xml – http://pastebin.com/rS4xqMej Image resources: … Read more

Is it possible to Generate a thumbnail from a video url in android

Without downloading video you can generate thumbnail from below code: public static Bitmap retriveVideoFrameFromVideo(String videoPath) throws Throwable { Bitmap bitmap = null; MediaMetadataRetriever mediaMetadataRetriever = null; try { mediaMetadataRetriever = new MediaMetadataRetriever(); if (Build.VERSION.SDK_INT >= 14) mediaMetadataRetriever.setDataSource(videoPath, new HashMap<String, String>()); else mediaMetadataRetriever.setDataSource(videoPath); // mediaMetadataRetriever.setDataSource(videoPath); bitmap = mediaMetadataRetriever.getFrameAtTime(); } catch (Exception e) { e.printStackTrace(); throw new … Read more