Last active
February 23, 2018 21:23
-
-
Save netgfx/f88e21c859cb61ffa96c25f15fac0bc8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import AVFoundation | |
| let fileURL = NSURL(string: "https://freemusicarchive.org/file/music/ccCommunity/Rotten_Bliss/The_Nightwatchman_Sings/Rotten_Bliss_-_08_-_Timer_Erase.mp3") | |
| let avAsset = AVAsset(url: fileURL! as URL) | |
| let assetKeys = ["playable"] | |
| var playerItem = AVPlayerItem(asset: avAsset, automaticallyLoadedAssetKeys: assetKeys) | |
| var playerQueue = AVQueuePlayer(items: [playerItem]) | |
| playerQueue.play() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment