Reputation:
I am using a library named Jukebox , to play audios files , I want to make it player faster or slower. It inherits AVPlayerItem , but I can't find how. Any one can help me?
Upvotes: 2
Views: 1026
Reputation: 14995
I think you can use the AVPlayer rate property below
var rate: Float { get set }
For instance:-
if let playerItem = AVPlayerItem(URL: yourUrl), let player = AVPlayer(playerItem: playerItem) {
//This will update your player speed faster or slower accordingly
player.rate = Float(rateValue)
}
Upvotes: 2