android-videoview

Android VideoView black screen

僤鯓⒐⒋嵵緔 提交于 2019-11-26 19:48:50
I have been looking for a way to get rid of the nasty black initial screen on a VideoView before the start() method is run. I have tried with background image on the widget but it doesnt work as expected at all. I have also tried putting an image of the first frame in the video on top of the VideoView and hiding it after the stars() method. Adding an onPrepared listener to start the video and then hide the image. This works but there is a horrible flicker in the transition and i don't know how to get rid of it. Thanks for your reply. Adding the MediaController had no effect at all. The problem

VideoView getDrawingCache is returning black

时光怂恿深爱的人放手 提交于 2019-11-26 18:59:28
So I'm trying to do a screen shot of a VideoView. I figured the easiest way would be: videoView.setDrawingCacheEnabled(true); Then when I need to take a screenshot: Bitmap screenshot = videoView.getDrawingCache(); But for some reason the bitmap I get back is just black every time. Anyone had any success with this? I also tried: Bitmap bitmap = Bitmap.createBitmap(videoView.getWidth(), videoView.getHeight(), Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(bitmap); videoView.draw(canvas); But once again, this returns me a black image. I can see that the VideoView is hardly even documented

Display a video in a VideoView from Firebase URL in Android

a 夏天 提交于 2019-11-26 18:37:59
问题 When I run my app I'm having these issues. A black screen flashes for 2 secs and then displays the actual intent of my app. The video gets started and when I scroll up/down, the VideoView turns white and continues playing. Not able to see the video but plays in background. After playing is done, for few seconds I'm getting this "Can't play this video" dialog. This is the excerpt from my Adapter Code: public class MessageAdapter extends ArrayAdapter<Message> { private static class ViewHolder {

play streaming in VideoView, convert url to rtsp

痴心易碎 提交于 2019-11-26 18:34:55
问题 I need to play youtube video and record video in the same layout. To perform this I search for youtube api and found that android version need to be higher than 2.2, this ok but, i want to use VideoView. I saw some post here about this issue and decide eventually to use this code to watch video in VideoView. videoView = (VideoView) findViewById(R.id.your_video_view); Log.d(TAG,getUrlVideoRTSP(current_url) + " id yotube1 " ); //here type the url... videoView.setVideoURI(Uri.parse

Android — Can't play any videos (mp4/mov/3gp/etc.)?

风格不统一 提交于 2019-11-26 18:19:53
问题 I'm having great difficulty getting my Android application to play videos from the SD card. It doesn't matter what size, bitrate, video format, or any other setting I can think of, neither the emulator nor my G1 will play anything I try to encode. I've also tried a number of videos from the web (various video formats, bitrates, with and without audio tracks, etc.), and none of those work either. All I keep getting is a dialog box that says: "Cannot play video" "Sorry, this video cannot be

Strange Behavior of Android VideoView - “Can't Play Video”

只谈情不闲聊 提交于 2019-11-26 17:39:01
问题 In my application,showing video from sdcard folder or new taken video from Video intent in a VideoView in different Activity by passing file path of the video selected. Now the problem is, I have tested this app in my 2 devices LG Optimus Black and LG Optimus Me and it works like charm not problem no force close. Now when i test this app in Samsung Fascinate 2.1 the video view shows the message "Can't Play Video" no matter i select existing video or take new one. Remember the app is working

Video is not showing on VideoView but I can hear its sound

时光毁灭记忆、已成空白 提交于 2019-11-26 16:49:38
问题 On my button click I wrote the following code for playing video from my SDCARD (mp4). video_view = (VideoView)findViewById(R.id.video_view); video_view.setVideoPath("/sdcard/myvideo.mp4"); video_view.setMediaController(new MediaController(this)); video_view.start(); I can play recorded video from SDCARD in player. But when I run it on my application in videoview I can hear only sound. Problem : I am not able to see the video. ---- I tried following SO link but still no luck ---- link 1 link 2

How to play multiple video files simultaneously in one layout side by side in different view in Android

痞子三分冷 提交于 2019-11-26 16:11:42
In Android, I created a layout with three surface view side by side, and I want to play one video file with different media player simultaneously. But one problem I faced that none of three can play that video simultaneously. One or two of them getting stopped the display. If I used video view instead of Media Player class directly, but the problem remains the same. Please anybody can help. What the problem is for? It is giving error surface creation failed native error. I tried different combination such as one file in 3 different view, three files in three different view, but the problem is

Full screen videoview without stretching the video

老子叫甜甜 提交于 2019-11-26 15:50:35
I wonder if I can get a way to let video run via videoview in full screen? I searched a lot and tried many ways such as: Apply theme in manifest: android:theme="@android:style/Theme.NoTitleBar.Fullscreen" but that does not force the video to be in full screen. Apply in activity itself: requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); also does not force the video to be in full screen. The only way force video to full screen is: <VideoView android:id="@+id/myvideoview" android:layout

How to play .mp4 video in videoview in android?

主宰稳场 提交于 2019-11-26 15:39:36
问题 I am working on video player application, I want to play .mp4 video in native videoview. I am not able to play video using url . I am getting error Sorry this video cannot be played and also I am not able to play downloaded video in native videoview. My code for playing video in videoview: String mUrl = "http://www.servername.com/projects/projectname/videos/1361439400.mp4"; VideoView mVideoView = (VideoView)findViewById(R.id.videoview) videoMediaController = new MediaController(this);