AVURLAsset getting video size

前端 未结 7 1825
礼貌的吻别
礼貌的吻别 2020-12-03 16:57

This is pretty frustrating. I\'m trying to get the size of an AVURLasset, but try to avoid naturalSize since Xcode tells me, this is deprecated in iOS5.

<
相关标签:
7条回答
  • For Swift 5

      let assetSize =  asset.tracks(withMediaType: .video)[0].naturalSize
    
    0 讨论(0)
提交回复
热议问题