Search code examples
androidsurfaceviewandroid-videoview

VideoView vs SurfaceView - Android


I am going to create InApp Video player which will play the videos from our content server and will also support live streaming. Previously was using third party API. I am confused about going with SurfaceView or VideoView as I have read that VideoView has more lines of code and will be less efficient. Help needed regarding from where should I start? Also need clarity between both. Yes, I have gone through some questions but still confused. Thank you in Advance.


Solution

  • Frankly Speaking,

    VideoView is the combination of SurfaceView and MediaPlayer,

    VideoView = SurfaceView + MediaPlayer

    But advantage of using Surfaceview and MediaPlayer separately is that you will have the ability to customize it.

    I just used VideoView few days ago in my app. I actually had the same confusion. Since, then I came to know about it. I used VideoView. Here is the link below

    Link

    Hope it helps