After completed the Full audio handle the Audio player iOS Swift
After audio finished playing we want to set all the player settings to default.So we will call the audioPlayerDidFinishPlaying method in the class.
Code:
func audioPlayerDidFinishPlaying(_ player: AVAudioPlayer!, successfully flag: Bool) {
func audioPlayerDidFinishPlaying(_ player: AVAudioPlayer!, successfully flag: Bool) {
let view = progress.superview!
audioPlayBtn.isSelected = false
progress.value = 0.0
player.pause()
updater.invalidate() // updater for the slider play
}
Comments
Post a Comment