Video in VideoView is not displayed?

Private void iniElements() { mPreview = (SurfaceView) findViewById(R.id. Screen_tutorial_video_surface); holder = mPreview.getHolder(); holder. AddCallback(this); holder.

SetType(SurfaceHolder. SURFACE_TYPE_PUSH_BUFFERS); holder. SetFixedSize(getWindow().

GetWindowManager(). GetDefaultDisplay().getWidth(), getWindow(). GetWindowManager().

GetDefaultDisplay().getHeight()); mMediaPlayer = new MediaPlayer(); mMediaPlayer. SetDisplay(holder); } private void iniPlayer() { try { mMediaPlayer. SetDataSource(videoPath); mMediaPlayer.prepare(); } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (IllegalStateException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } mMediaPlayer.

SetAudioStreamType(AudioManager. STREAM_MUSIC); }.

I'm using VideoView as part of a bigger program. And since VideoView is practically an encapsulation of MediaPlayer and surface, I see no reason to manage that separately. I don't think it is related to that, but to some layout configuration.

– MByD Mar 19 at 21:36.

Well I was able to find a solution to my problem by returning to the solution I got here (thanks Sunil) and modify it a bit (also mentioned in my question): The change is in the ScrollView - android:layout_height="350px" instead of android:layout_height="wrap content" which put it in the lower part of the screen, but with a specific size and no more than that. Though it is not the cleanest way possible, it does fulfill exactly what I need. I hope someone will find it useful.

I have an application and in my layout (see xml below)there are VideoView and TextView (same application from my question here, but with a few changes in layout). The TextView is displayed and scrolls fine, but now the video is not displayed when I tried to start it. What am I doing wrong?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions