我正在开发包含音乐播放器的应用,我想显示歌词,目前我正在使用以下代码:
MPMediaItem *currentItem = [musicPlayer nowPlayingItem];
NSURL* songURL = [currentItem valueForProperty:MPMediaItemPropertyLyrics];
AVAsset* songAsset = [AVURLAsset URLAssetWithURL:songURL options:nil];
NSString* lyrics = [songAsset lyrics];