MediaPlayer seekTo doesn't work

﹥>﹥吖頭↗ 提交于 2019-12-11 08:57:38

问题


If I call seekTo before start, an audio starts from beginning.

Is it possible to start playing audio from a specific point?

Thanks!


回答1:


It seems to be a bug on Android platform, and so far it hasn't been fixed. See this issue here.




回答2:


I've just experienced the same issue. The solution was to use MediaPlayer.OnSeekCompleteListener.

However in my case there weren't any problems with calling seekTo before start if the audio file was relatively short, but if it became longer then it seemed that starting the playback occurred earlier than seekTo was finished.



来源:https://stackoverflow.com/questions/17678027/mediaplayer-seekto-doesnt-work

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