         // Dispose of any resources that can be recreated.
     }
     
-    func loadStoryVideos() -> (PFObject) {
-        var query = PFQuery(className:"Story")
-        var storyObject = query.getObjectWithId(storyObjectId)
-        return storyObject
+    func loadPerspectiveVideos() -> (PFObject) {
+        var query = PFQuery(className:"Perspective")
+        var perspectiveObject = query.getObjectWithId(perspectiveId)
+        return perspectiveObject
     }
     
     func playVideos() {


class PlaybackVC: AVPlayerViewController { // UIViewController
    
//    var storyObjectId : String!    WILL TAKE IN STORY ID FROM DASHBOARD
    var storyObjectId = "2VxXrXOBn4"
    var videoList : [AVPlayerItem] = []
    
    override func viewDidLoad() {
        super.viewDidLoad()
        var story = loadStoryVideos()
        var videosArray:NSArray = story["videos"] as NSArray
        for item in videosArray{
            var urlStr = NSURL(string: item as String)
            self.videoList.append(AVPlayerItem(URL: urlStr))

    func stop(){
        self.player = nil;
        NSNotificationCenter.defaultCenter().removeObserver(self, name: "AVPlayerItemDidPlayToEndTimeNotification", object: nil)
        self.dismissViewControllerAnimated(false, completion: nil)
        if playingCompletedPerspective == true {
            self.navigationController?.popToRootViewControllerAnimated(true)
        } else {
            let vc = self.storyboard?.instantiateViewControllerWithIdentifier("RecordVC") as RecordVC
            vc.newPerspective = false
            vc.perspectiveId = perspectiveId
            self.navigationController?.pushViewController(vc, animated: true)
        }
    }
    

