swift在PHAsset获取本地视频的url

一句代码实现:

PHCachingImageManager().requestAVAsset(forVideo: asset, options:nil, resultHandler: { (asset, audioMix, info)in

          let  avAsset = asset as? AVURLAsset

//        print(asset?.url)

          self.videoUrl = avAsset?.url

})

你可能感兴趣的:(swift在PHAsset获取本地视频的url)