android video, hear sound but no video -
I have tried many different instances but no video can be found to show me. I heard the voice but no video I thought I was just a wrong video format, so I downloaded a fat professional in 3GP format and was still not happy. I am using Eclips Java EE with Android SDK and my app targets 1.5 SDK (API Level 3) without Google SDK. Does anyone have posted a link to a video to play in Android or can tell me my problem with the code.
/ ** is called when activity is created previously * / @ Override Crate on Public Zero (Bundle Saved Instantstate) {Super. InstanceState); This.setContentView (R.layout.video_test); SurfaceView v = (SurfaceView) findViewById (R.id.surface_video); Surface holder = v.getHolder (); // Set Transparency //Vundo () .setformat (pixelformat.exe); // set a size for the video screen // holder. AddClallback this); Holder.setFixedSize (400300); Media Player MP = Media PlayerCredit (this, R.O.O.Fiet); Mp.setDisplay (holder); //mp.setAudioStreamType (2); Try {//mp.prepare (); Mp.start (); } Hold (IllegalStateException e) {// TODO self-generated blocking block e.printStackTrace (); }
She has a layout in video_test.xml
> Blockquite
If you are using the emulator , Then hardware acceleration is not available in Android devices in the emulator. For example, at 2.6GHz Core 2 Duo, sometimes I can get a video to play back, but not always. On slower machines, video playback never works. On 2.5GHz Core 2 quad, I always get video playback, I'm usually asked to test video playback on real devices.
I am also unsure if video playback works with raw resources. I strongly encourage you to try to use video from any file on the SD card for the first time.
Regardless of the video that works, I know that in your MP4 forms from the "Documentaries and You" and "Music for our Grandbrand" work
Comments
Post a Comment