获取视频时间 Ace_Young 2019-05-16 242 阅读1分钟 import AVKit func getVideoDuration(videoURL: URL) { let asset = AVAsset(url: videoURL) let duration = asset.duration let videoDuration = CMTimeGetSeconds(duration) print(videoDuration) }