I was wondering if there's a difference between them when it comes to streaming videos.
I know VideoView
can be used for streaming and what is Mediaplayer
for? As far as I know, MediaPlayer
can do the same thing as VideoView
right?
Can anyone give me the answer?
And if I want to stream video from the server by using RTSP to Android, which one should I start with? VideoView
or MediaPlayer
?
Any suggestion?
Was asking the same question and as I understood from what Mark (CommonsWare) advised on numerous threads here, VideoView is a wrapper (200 hundred lines of code) for MediaPlayer and SurfaceView to provide embedded controls.
He also kindly shared some examples:
https://github.com/commonsguy/vidtry/blob/master/src/com/commonsware/android/vidtry/Player.java
and example from android sdk http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/media/MediaPlayerDemo.html
Also some people had issues playing video on emulator, so make sure to test it on actual device if you have issues