X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=blobdiff_plain;f=application%2Fcontrollers%2Fvideo.php;h=64a1e63f24b457ef7d75de39fc8ba344d60109b0;hb=a4b67ff4aaa76dc95e774be78724909193999ee4;hp=cb190355a21d653de8579731a41d70ede070aecb;hpb=44e76cbf029fbec96b9a91837963b872f4984004;p=living-lab-site.git diff --git a/application/controllers/video.php b/application/controllers/video.php index cb19035..64a1e63 100644 --- a/application/controllers/video.php +++ b/application/controllers/video.php @@ -24,7 +24,7 @@ class Video extends CI_Controller { * * @param string $id DB id of the video * @param string $name `name` of the video from DB - * @param string $plugin video plugin ('vlc', 'html5'). If it's set + * @param string $plugin video plugin ('ns-vlc', 'ns-html5'). If it's set * to NULL or 'auto', the plugin is automatically selected. */ public function watch($id, $name = NULL, $plugin = NULL) @@ -39,8 +39,8 @@ class Video extends CI_Controller { // Display page. $params = array( 'title' => $data['video']['title'] . ' -- ' . $this->config->item('site_name'), - 'stylesheets' => array('jquery-ui.css', 'NextSharePC-interface.css'), - 'javascripts' => array('jquery.min.js', 'jquery-ui.min.js', 'NextSharePC-interface.js'), + 'stylesheets' => array('jquery-ui.css', 'NextShare_VLC_plugin.css'), + 'javascripts' => array('jquery.min.js', 'jquery-ui.min.js', 'NextShare_VLC_plugin.js', 'video.js'), //'metas' => array('description'=>'','keywords'=>'') ); $this->load->library('html_head_params', $params); @@ -52,6 +52,22 @@ class Video extends CI_Controller { $this->load->view('footer'); $this->load->view('html_end'); } + + /** + * AJAX page which retrieves a video plugin. + * + * The associated with this controller should be parameter type + * concatenated with '_plugin_view' and must be located in + * 'application/views/video'. + * + * @param string $type 'ns-vlc', 'ns-html5' + */ + public function plugin($type) + { + $data['url'] = $this->input->post('url', TRUE); + + $this->load->view('video/'. $type . '_plugin_view', $data); + } } /* End of file video.php */