在 iPhone 中的 AVQueuePlayer 中设置搜索时间
我正在开发一个应用程序,我想同时播放两个视频,但使用 MPMoviePlayer
是不可能的。所以我使用了 AVQueuePlayer
来播放视频。因为我成功播放视频,但问题在于跳到特定时间。为此,我们有方法调用 seekToTime
并且需要 CMTime 数据类型
的变量。
我能够在 1、2、3 秒等时间跳跃,我的问题是我想在时间 1.2、1.3、1.4 秒等跳跃,但我当时无法移动视频。
任何人都可以知道这个问题的解决方案,请帮我解决这个问题。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
toleranceBefore:之前时间的准确性 strong> 您要将播放光标移动到的位置。
[time-beforeTolerance]
toleranceAfter:您想要将播放光标移动到的之后时间的准确性。
[time+afterTolerance]
可以说这两个参数都代表精度的裕度。
我使用
self 看到了其他问题 .player.currentItem.asset.duration
获取持续时间。祝你好运。
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.