开发者

AVPlayer restart sync issue

开发者 https://www.devze.com 2023-03-07 10:53 出处:网络
Hi all Im working with AVPlayer app to run on an iPad and just getting my head around it. Currently stuck with an issue that i cant seem to get the avplayer to restart a currently playing file safely.

Hi all Im working with AVPlayer app to run on an iPad and just getting my head around it. Currently stuck with an issue that i cant seem to get the avplayer to restart a currently playing file safely. The video doesnt need to be finished for a call for the command to restart is called.

[player[currentPage] seekToTime:startTime toleranceBefore:startTime toleranceAfter:startTime];



[player[currentPage] play];

is what im using at the moment and it works majority of the time but sometimes the video seems to go out of sync with the sound . that is to say the sound restarts fine but the video seems to be paused and doesnt restart un开发者_运维技巧til the sound catches back up with it.

Anyone have experience with this or can point me in the right direction to research it myself. I have gone through the avplayer class files on the apple dev site and have been unlucky with searching for similar problems.

Thanks for any help

G


Check out my answer for this question:
iOS Multiple AVPlayer objects results in loss of audio/video sync

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号