iPlayer icon indicating copy to clipboard operation
iPlayer copied to clipboard

seekTo()方法无效--->已找到原因,请忽略

Open pyzheng opened this issue 2 years ago • 2 comments

mVideoPlayer.setDataSource(liveRoom.getLivePlayUrl()); mVideoPlayer.prepareAsync();

......

Log.d(msg,"=================> positionMs=" + (positionMs/1000)); Log.d(msg,"=================> player.getCurrentPosition()1=" + player.getCurrentPosition()); player.seekTo(positionMs); Log.d(msg,"=================> player.getCurrentPosition()2=" + player.getCurrentPosition());

player.seekTo(positionMs)的前后获取的player.getCurrentPosition()居然是一样的。视频也没有前进到指定时间。

pyzheng avatar Dec 20 '22 06:12 pyzheng

找到问题了,请忽略。 源码里面跳转判断播放了才能跳转,刚好我在跳转之前,先暂停。 取消暂停,直接跳转,就可以了。谢谢

pyzheng avatar Dec 20 '22 07:12 pyzheng

客气了~

hty527 avatar May 26 '23 10:05 hty527