I've got a video in my application and I want to loop it forever I tried adding numberOfLoops function to my player but it doesn't seem to work, any solutions ?
private func configVideo(){
guard let model = model else {
return
}
guard let path = Bundle.main.path(forResource: model.videoFileName, ofType: model.videoFileFormat) else { return }
player = AVPlayer(url: URL(fileURLWithPath: path))
let playerView = AVPlayerLayer()
playerView.player = player
playerView.frame = contentView.bounds
playerView.videoGravity = .resizeAspectFill
videoContainer.layer.addSublayer(playerView)
player?.volume = 0
player?.play()
}