我只想弄清楚如何以秒为单位获取视频的总时间。是否有加载的视频元数据之类的?
最佳答案
MPMoviePlayerController 有一个属性duration (iOS 3.2+):
The duration of the movie, measured in seconds. (read-only)
@property (nonatomic, readonly) NSTimeInterval duration
If the duration of the movie is not known, the value in this property is 0.0. If the duration is subsequently determined, this property is updated and a MPMovieDurationAvailableNotification notification is posted.
关于iphone - 你如何获得 iphone MPMoviePlayer 视频的总时间?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1214958/