setOnSeekCompleteListener for VideoView how can be achieved [duplicate]

我怕爱的太早我们不能终老 提交于 2019-12-01 23:06:43

问题


I'm developing a video player application for which the user has an option to seek to a particular location, but the problem is there is no setOnSeekCompleteListener for VideoView,

So I am not sure if the seek operation that was requested has completed or not, and whether to start playback if it is complete.

Is there a way to implement a setOnSeekCompleteListener with VideoView.

Thanks, Shrikant.


回答1:


You can switch from using VideoView to using MediaPlayer and a SurfaceView.

Or, grab the source code to VideoView (which is simply a combination of MediaPlayer and a SurfaceView) and modify it to expose the MediaPlayer setOnSeekCompleteListener().



来源:https://stackoverflow.com/questions/4063071/setonseekcompletelistener-for-videoview-how-can-be-achieved

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