VideoView与SurfaceView-Android [英] VideoView vs SurfaceView - Android

查看:78
本文介绍了VideoView与SurfaceView-Android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将创建InApp视频播放器,该播放器将播放我们内容服务器中的视频,并且还将支持实时流式传输.以前使用第三方API.我对使用SurfaceView或VideoView感到困惑,因为我已经了解到VideoView具有更多的代码行,并且效率会降低.从我应该从哪里开始需要帮助?两者之间也需要明确.是的,我经历了一些问题,但仍然感到困惑.先感谢您.

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.

推荐答案

坦白地说,

VideoView是SurfaceView和MediaPlayer的组合,

VideoView is the combination of SurfaceView and MediaPlayer,

VideoView = SurfaceView + MediaPlayer

VideoView = SurfaceView + MediaPlayer

但是单独使用Surfaceview和MediaPlayer的好处是您将能够对其进行自定义.

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

几天前我刚刚在我的应用中使用了VideoView.我实际上也有同样的困惑.从那以后,我就知道了.我使用了VideoView.这是下面的链接

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

链接

希望有帮助

这篇关于VideoView与SurfaceView-Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆