VideoView vs SurfaceView - Android

岁酱吖の 提交于 2020-12-13 07:21:17

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/52057606/videoview-vs-surfaceview-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!