Example #1
0
 function run()
 {
     $lives = new Model_lives();
     $videos = new Model_videos();
     if (isset($this->get["id"])) {
         $this->video = $videos->select($this->get["id"]);
         $this->live = $lives->select($this->video["liveId"]);
         $this->set("video", $this->video);
         $this->set("live", $this->live);
     }
     if (filesize("{$this->config["contents_dir"]}/{$this->video["filename"]}") == 0) {
         $pathinfo = pathinfo($this->video["filename"]);
         $json = $this->acd_meta();
         if (is_null($json)) {
             $this->acd_sync();
             $json = $this->acd_meta();
         }
         $this->set("video_url", $json["tempLink"] . "?/v." . $pathinfo["extension"]);
     } else {
         $video_url = "{$this->config["contents_dir_url"]}/{$this->video["filename"]}";
         $this->set("video_url", $video_url);
     }
     $this->render();
 }
Example #2
0
 function get_video()
 {
     $videos = new Model_videos();
     $this->video = $videos->select($this->get['id']);
 }