試著抓iTunes API練習
Published in
1 min readAug 20, 2018
使用URLSession.shared.dataTask
解析JSON網站:
試聽使用import AVFoundation
@IBAction func previewSongButton(_ sender: Any) {let player = AVPlayer(url: previewUrl!)let playerLayer = AVPlayerLayer(player: player)playerLayer.frame = self.view.boundsself.view.layer.addSublayer(playerLayer)player.play()}