Re: Use WKSessionFile as Data for AVAudioPlayer?
Re: Use WKSessionFile as Data for AVAudioPlayer?
- Subject: Re: Use WKSessionFile as Data for AVAudioPlayer?
- From: Jens Alfke <email@hidden>
- Date: Tue, 07 Feb 2017 20:25:31 -0800
> On Feb 7, 2017, at 6:49 PM, Eric E. Dolecki <email@hidden> wrote:
>
> Now, I want to instantiate an AVAudioPlayer and play that sent file. I know
> that it's received (didFinish file transfer fires in the Watch Extension).
> How do I do that? I don't know how to make that file Data.
Can’t you just create the AVAudioPlayer from the file's URL? I’m not super handy with Swift, but it should be something like `AVAudioPlayer(contentsOfURL: fileURL)`.
—Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden