I've got a simple audio player that works great. I'm playing a remote URL mp3. My code:
@IBAction func playAudio(sender: AnyObject) {
let url = self.productAudio
let playerItem = AVPlayerItem( URL:NSURL( string:url ) )
player = AVPlayer(playerItem:playerItem)
player.
player.rate = 1.0;
player.play()
}
But the audio is outputed by the loud speaker. How can I do to listen the audio at the ear speaking?
thanks!
Aucun commentaire:
Enregistrer un commentaire