WKAudioFilePlayer
An object that controls playback of a single audio item.
Declaration
class WKAudioFilePlayerOverview
Use a player object to start and stop playback and to control the rate of playback. (The WKAudioFileQueuePlayer subclass extends the basic behavior to support playback of more than one item.)
The value of the player’s presentation-related properties are not valid until the underlying asset is loaded. Use the value of the status property to determine when it is valid to get the values of other properties. Specifically, wait until the status changes to WKAudioFilePlayerStatus.readyToPlay to access relevant properties.
The WKAudioFilePlayer class is key-value observing compliant for the currentItem, status, and rate properties. You can use an observer to detect changes to those properties and react accordingly. For information on how to observe properties using key-value observing, see Key-Value Observing Programming Guide.