Control buffering in VideoView

有些话、适合烂在心里 提交于 2019-12-13 02:25:50

问题


I'm trying to use a VideoView to display a mp4 video from Vimeo. Everything works fine but is there a way that I can control the buffering of the video? My problem is that I have 6 VideoView's in one view and as soon as the view loads all of them starts buffering right away. I would like them to only start buffering when i press play on one of them to lower internet usage.

Is there a way to start/stop the buffering?


回答1:


For your case: The VideoView wraps the MediaPlayer, making it unable to control the buffering. You would have to recreate the "VideoView" by taking a surface and a MediaPlayer, then calling PrepareAsync on the latter. Refer to this post for more details.



来源:https://stackoverflow.com/questions/24367144/control-buffering-in-videoview

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