1

I am developing an application in that I want to play two video at the same time, That is not possible using MPMoviePlayer. So I have used AVQueuePlayer To play video. As I am success to play video but the problem is in jumping to particular time. For that we have method call seekToTime and we need to variable of the CMTime datatype.

I am able to jump at time in 1,2,3 seconds etc, My problem that I want to jump at Time 1.2, 1.3 , 1.4 second etc. but I am not able to move the video at that time.

Can any one know the solution of this problem than please help me to solve the problem.

Ahmad Kayyali
  • 8,233
  • 13
  • 49
  • 83
Crazy Developer
  • 3,464
  • 3
  • 28
  • 62

1 Answers1

1

The seekToTime: method, however, is tuned for performance rather than precision. If you need to move the playhead precisely, instead you use seekToTime:toleranceBefore:toleranceAfter Reference


toleranceBefore: The accuracy of the time before to which you would like to move the playback cursor.
[time-beforeTolerance]

toleranceAfter: The accuracy of the time after to which you would like to move the playback cursor.
[time+afterTolerance]

Lets say both parameters represents the margin of in-accuracy.

I have seen other Question on SO using self.player.currentItem.asset.duration to get the duration.

Good Luck.

Community
  • 1
  • 1
Ahmad Kayyali
  • 8,233
  • 13
  • 49
  • 83
  • Hi, I have try this method , but still have the same problem . because may be i am not passing the exact parameter that is needed. Can you please tell me what are the parameter need to pass – Crazy Developer Apr 27 '11 at 04:39
  • @kunal patel: Kindly see my updated answer, let me know if i can assist further. – Ahmad Kayyali Apr 27 '11 at 06:07