I want to extract album name, artist name, cover art, and duration from a song using AVURLAsset
in iOS 8.1.
So far I have:
NSURL *url = [NSURL URLWithString:[strSongPath stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
AVURLAsset* audioAsset = [AVURLAsset URLAssetWithURL:url options:nil];
What are the details to put in after this?
Did you already checked audioAsset.commonMetadata
?
This property will return an array of all available AVMetaDataItem
objects for your initialized asset.
Each item is representing exactly one available metadata property of your asset