我想在Android videoview 中任意时间播放视频
_player.setVideoURI(Uri.parse(uri));
MediaController mc = new MediaController(this);
_player.setMediaController(mc);
_player.start();
现在我要设置时间:10:20 寻找文件并播放它(10 分 20 秒)
最佳答案
参见 VideoView.seekTo(int msec)方法
另请注意 doc 中的一件事
The playback position can be adjusted with a call to seekTo(int). Although the asynchronuous seekTo(int) call returns right way, the actual seek operation may take a while to finish, especially for audio/video being streamed. When the actual seek operation completes, the internal player engine calls a user supplied OnSeekComplete.onSeekComplete() if an OnSeekCompleteListener has been registered beforehand via setOnSeekCompleteListener(OnSeekCompleteListener).
关于android - 如何在 Android 中播放任意时间的视频?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16035592/