开发者

How to save the played movie time so that next time the user can play it from where they paused?

I just want to know that how can I save the time of a played m开发者_运维技巧ovie so that again, when the user play it, they play from the paused time and not from the beginning.

Second, I want to know which media player is better for me for this kind of application.


First, I recommend that you use the MPMoviePlayerController to play the movies. That will make this simple. MPMoviePlayerController implements the MPMediaPlayback protocol, which includes a read/write property named currentPlaybackTime.

You can read the time from currentPlaybackTime when the user stops or pauses the movie and save that value. Later, when the user wants to continue watching from that same point, you simply set currentPlaybackTime to that saved value.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜