在这里给AVPlayer播放在线音频文件作个记号
1.在H文件中初始:
==============
AVPlayer *mp3Player;
AVPlayerItem *mp3PlayerItem;
id audioMix;
id volumeMixInput;
2.在MM文件中:
view source
?
01.
//作品播放
02.
NSURL * songUrl = [NSURL URLWithString:userInfo.songUrl];
03.
AVURLAsset *movieAsset = [[[AVURLAsset alloc]initWithURL:songUrl options:nil]autorelease];
04.
05.
06.
self. mp3PlayerItem = [AVPlayerItem playerItemWithAsset:movieAsset];
07.
[self. mp3PlayerItem addObserver:self forKeyPath:@"status" options:0 context:NULL];
08.
self. mp3Player = [AVPlayer playerWithPlayerItem:self. mp3PlayerItem];
09.
AVPlayerLayer *playe