I am trying to play video which is recorded in this path by me. But I can't play video from this path. What should I do?
let pathMovie = (NSHomeDirectory() as NSString).stringByAppendingPathComponent("Documents/Movie.mp4")
let fileUrl = NSURL(fileURLWithPath: pathMovie)
self.videoFrame = view.frame
self.fillMode = .ResizeAspectFill
self.alwaysRepeat = true
self.sound = true
self.startTime = 0.0
self.alpha = 1
self.backgroundColor = UIColor.blackColor()
self.contentURL = fileUrl
And this is error which I getting.
Failed: Optional(Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedFailureReason=An unknown error occurred (-12893), NSLocalizedDescription=The operation could not be completed, NSURL=file:///var/mobile/Containers/Data/Application/.....-...-...-....-..../Documents/Movie.mp4, NSUnderlyingError=0x150a38e80 {Error Domain=NSOSStatusErrorDomain Code=-12893 "(null)"}})