gpt4 book ai didi

iphone - 你如何获得 iphone MPMoviePlayer 视频的总时间?

转载 作者:行者123 更新时间:2023-11-28 21:41:00 24 4
gpt4 key购买 nike

我只想弄清楚如何以秒为单位获取视频的总时间。是否有加载的视频元数据之类的?

最佳答案

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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com