I upload a video to server
let url = NSURL(fileURLWithPath: videoFilePath!)
data = NSData(contentsOfURL: url)!
fileName = "video\( NSDate().timeIntervalSince1970).mov"
fileType = "video"
Then try to play it, but it doesn’t play for some reason.
let videoFilePath = messageToPass.file?.fileURL
let url = NSURL(string: videoFilePath!)
print(url!)
let player = AVPlayer(URL: url!)
moviePlayer.player = player
self.presentViewController(moviePlayer, animated: true, completion: {
self.moviePlayer.player!.play()
})
I figure out, that the problem is not with url.
For example here is the link to video (https://api.backendless.com/b98036d8-4c4b-8d51-ff42-e6c0e74cf800/v1/files/video1458236048.86005.mov)
and not with video itself.
if you paste it to safari browser it can’t play it either, but Google Crome will download it and the video will be Ok.
My thought is that the problem is that the video can’t be streamed from backendless.
How it can be solved?
Thank You!