直接上代码!
@IBAction func startPlay(sender: AnyObject) {
playDisc.startRoatating()
self.setAnchorPoint(CGPointMake(0.25, 0.13),forView: self.playNeedleImageView)
self.playNeedlePlay()
let urlMp3 = NSURL(string: "http://api.sport-x.cn/audio/qiannvyouhun.mp3")
let avPlayer = AVPlayer.init(URL: urlMp3!)
avPlayer.play()
//let urlMp3 = NSURL(string: "http://api.sport-x.cn/audio/qiannvyouhun.mp3")
//let myAFSoundItem = AFSoundItem.init(streamingURL: urlMp3!)
//let player:AFSoundPlayback = AFSoundPlayback.init(item: myAFSoundItem!)
//player.play()
print("Player paly!")
}