如何使用从保存为 PFFile 的解析下载的 MPMoviePlayerController 播放视频?我使用以下代码下载了视频文件:
var query = PFQuery(className:"Video")
query.whereKey("Nome", equalTo:"prova")
query.findObjectsInBackgroundWithBlock {
(objects: [AnyObject]?, error: NSError?) -> Void in
if error == nil {
// The find succeeded.
println("Successfully retrieved \(objects!.count) scores.")
if let objects = objects as? [PFObject] {
for object in objects {
var imageFile:PFFile =object.objectForKey("Video")
imageFile.getDataInBackgroundWithBlock {
(imageData: NSData?, error: NSError?) -> Void in
?????????????
}
}
} else {
println("Error: \(error!) \(error!.userInfo!)")
}
}