This library is awesome. Can't wait to see it grow.
I'm using this in a messaging app, and the only part missing is I need to know the size of the video, so I can lay it out appropriately. Using AVAsset for this inevitably causes a delay as it loads in the asset. If this property could be added that'd be awesome. Right now I'm doing it using AVAsset as follows:
extension AVAsset {
func size() -> CGSize? {
let tracks = self.tracksWithMediaType(AVMediaTypeVideo)
if tracks.count > 0 {
return tracks[0].naturalSize
} else {
return nil
}
}
}
This library is awesome. Can't wait to see it grow.
I'm using this in a messaging app, and the only part missing is I need to know the size of the video, so I can lay it out appropriately. Using AVAsset for this inevitably causes a delay as it loads in the asset. If this property could be added that'd be awesome. Right now I'm doing it using AVAsset as follows: