Skip to main content

Posts

Showing posts from October, 2018

Android MediaPlayer and VideoView Tutorial

1-  MediaPlayer 2-  VideoView 3-  MediaPlayer example 4-  Playing a video with VideoView example VideoView  is a custommized component which is available of Android, it is the combination of  MediaPlayer  and  SuffaceView  which  help you to play a video more easily. When using  VideoView , you can use  MediaController , this is available in Android which used to control media (such as start, stop, rewind, pause...) IF you locate   VideoView  and   MediaController  in a   FrameLayout,  you can get interface as follow: 3- MediaPlayer example The following simple example, use  Media Player  to play a music file and some controls of the play such as play, pause, rewind. Create a project named  MediaPlayerTutorial : 4- Playing a video with VideoView example Now, we can see an example with   VideoView and MediaController ...