Hi, i would like to play video files that are for example on my desktop, but i only get them playing, if i'm adding them to my project.
This works:
guard let path = Bundle.main.path(forResource: "video", ofType:"mov") else {
return
}
avPlayerView.player = AVPlayer(url: URL(fileURLWithPath: path))
avPlayerView.player?.play()
This not:
let path = "/Users/%Username%/Desktop/mov"
avPlayerView.player = AVPlayer(url: URL(fileURLWithPath: path))
avPlayerView.player?.play()
I had a project we're a got I running, sadly i lost it.
Does anyone know what I am missing?
Thanks