From ac366a43f0cda63c2506321104b6760c153ac993 Mon Sep 17 00:00:00 2001 From: Calin Burloiu Date: Wed, 31 Aug 2011 14:53:20 +0300 Subject: [PATCH] first stage finished: ready to publish to production; does not support users and user related features, search and upload yet --- application/config/p2p-tube.php | 2 +- application/controllers/catalog.php | 19 ++-- application/controllers/video.php | 3 + application/language/english/ui_lang.php | 2 +- application/language/romanian/ui_lang.php | 2 +- application/views/article/english/about.php | 30 +++--- application/views/article/english/help.php | 93 +++++++++++-------- .../views/article/english/install-plugins.php | 4 +- application/views/header.php | 2 +- application/views/video/watch_view.php | 12 +-- css/default.css | 2 +- css/jquery-ui-1.8.15.custom.css | 2 +- js/jquery.ui.imagemap.js | 4 +- js/jquery.ui.nsvideo.js | 2 +- 14 files changed, 98 insertions(+), 81 deletions(-) diff --git a/application/config/p2p-tube.php b/application/config/p2p-tube.php index 045f54d..24281e8 100644 --- a/application/config/p2p-tube.php +++ b/application/config/p2p-tube.php @@ -90,7 +90,7 @@ $config['default_torrent_ext'] = 'tstream'; | IDs must be numeric and must preferably start from 1. | */ -$config['categories'] = array(1 => 'movies', 2 => 'tech_talks', 3 => 'events', 4 => 'karaoke'); +$config['categories'] = array(1 => 'movies', 2 => 'tech-talks', 3 => 'events', 4 => 'karaoke'); /* |-------------------------------------------------------------------------- diff --git a/application/controllers/catalog.php b/application/controllers/catalog.php index 0c05388..3ed020f 100644 --- a/application/controllers/catalog.php +++ b/application/controllers/catalog.php @@ -85,24 +85,25 @@ class Catalog extends CI_Controller { $this->load->view('html_end'); } - public function category($category_id, $offset = 0) + public function category($category_name, $offset = 0) { // ** // ** LOADING MODEL // ** + // Video Category + $categories = $this->config->item('categories'); + $category_id = array_search($category_name, $categories); + $vs_data['category_name'] = $category_name; + $vs_data['category_id'] = $category_id; + $vs_data['category_title'] = $category_name ? + $this->lang->line("ui_categ_$category_name") : $category_name; + // Retrieve videos summary. $this->load->model('videos_model'); $vs_data['videos'] = $this->videos_model->get_videos_summary( - $category_id, intval($offset), + $vs_data['category_id'], intval($offset), $this->config->item('videos_per_page')); - // Video Category - $categories = $this->config->item('categories'); - $category_name = $categories[$category_id]; - $vs_data['category_title'] = $category_name ? - $this->lang->line("ui_categ_$category_name") : $category_name; - $vs_data['category_id'] = $category_id; - // Pagination $this->load->library('pagination'); $pg_config['base_url'] = site_url("catalog/category/$category_id/"); diff --git a/application/controllers/video.php b/application/controllers/video.php index 45e66d3..3637f14 100644 --- a/application/controllers/video.php +++ b/application/controllers/video.php @@ -40,6 +40,9 @@ class Video extends CI_Controller { $this->load->model('videos_model'); $this->videos_model->inc_video_var($id, 'views'); $data['video'] = $this->videos_model->get_video($id, $name); + $categories = $this->config->item('categories'); + $data['video']['category_name'] = + $categories[ $data['video']['category_id'] ]; $data['plugin_type'] = ($plugin === NULL ? 'auto' : $plugin); // Display page. diff --git a/application/language/english/ui_lang.php b/application/language/english/ui_lang.php index 70dffc0..fd366ea 100644 --- a/application/language/english/ui_lang.php +++ b/application/language/english/ui_lang.php @@ -20,7 +20,7 @@ $lang['ui_install_already_installed'] = ' is installed'; // Video Categories $lang['ui_categ_movies'] = 'Movies'; -$lang['ui_categ_tech_talks'] = 'TechTalks'; +$lang['ui_categ_tech-talks'] = 'TechTalks'; $lang['ui_categ_events'] = 'Events'; $lang['ui_categ_karaoke'] = 'Karaoke'; diff --git a/application/language/romanian/ui_lang.php b/application/language/romanian/ui_lang.php index 7417d32..878a6d6 100644 --- a/application/language/romanian/ui_lang.php +++ b/application/language/romanian/ui_lang.php @@ -12,7 +12,7 @@ $lang['ui_search'] = 'Search'; // Video Categories $lang['ui_categ_movies'] = 'Filme'; -$lang['ui_categ_tech_talks'] = 'TechTalks'; +$lang['ui_categ_tech-talks'] = 'TechTalks'; $lang['ui_categ_events'] = 'Evenimente'; $lang['ui_categ_karaoke'] = 'Karaoke'; diff --git a/application/views/article/english/about.php b/application/views/article/english/about.php index 64e7160..0c75b63 100644 --- a/application/views/article/english/about.php +++ b/application/views/article/english/about.php @@ -1,15 +1,15 @@ -

P2P-Next

-

P2P-Next is an integrated FP7 EU project involving more than 20 partners, including University Politehnica of Bucharest (UPB).

-

P2P-Next aims to build the next generation Peer-to-Peer (P2P) content delivery platform.

+

P2P-Next

+

P2P-Next is an integrated FP7 EU project involving more than 20 partners, including University Politehnica of Bucharest (UPB).

+

P2P-Next aims to build the next generation Peer-to-Peer (P2P) content delivery platform threw through the NextShare technology which enables video-on-demand and live streaming for both computers and digital set-top-boxes (STB).

This site provides information on UPB's contribution to the P2P-Next project activities. We are currently part of WP4 (Work Package 4 - IPvNext Networking Fabric) and WP8 (Work Package 8 - Living Lab Trials).

-

NextShare Video Plugins

+

NextShare Video Plugins

-
NextSharePC
-
a media-player browser plugin which uses VLC libraries for video rendering and incorporates P2P technology for VideoOnDemand (VoD) and LiveStreaming content delivery. The plugin is currently working with Internet Explorer and Firefox on Windows.
+
NextSharePC
+
a media-player browser plugin which uses VLC libraries for video rendering and incorporates P2P technology for VideoOnDemand (VoD) and LiveStreaming content delivery. The plugin is currently working with Internet Explorer and Firefox on Windows.
-
SwarmPlayer
+
SwarmPlayer
a browser plugin which uses the new HTML5 rendering and incorporates P2P technology for VideoOnDemand (VoD) and LiveStreaming content delivery
@@ -25,15 +25,15 @@ NextSharePC - win VLC + win VLC

win Windows

win Mac OS X

-

win Mozilla Firefox 3.5 or greater

-

win Internet Explorer 7.0 or greater

+

win Mozilla Firefox 3.5 or greater

+

win Internet Explorer 7.0 or greater

@@ -41,7 +41,7 @@ SwarmPlayer - win HTML5 + win HTML5

win Windows

@@ -49,8 +49,8 @@

win Mac OS X

-

win Mozilla Firefox 3.5 or greater

-

win Internet Explorer 7.0 or greater

+

win Mozilla Firefox 3.5 or greater

+

win Internet Explorer 7.0 or greater

@@ -62,9 +62,9 @@
  • from feature films
  • from TechTalks technical presentations
  • or from various events from our faculty
  • -
  • from karaoke parties in Automatic Control and Computers Faculty
  • +
  • from karaoke parties in Automatic Control and Computers Faculty
  • -

    All available movies are currently seeded by 5 peers with high bandwidth (1Gbit) kindly provided by the NCIT-Cluster. Anyone that watches a movie will take part in the swarm and ensure greater availability to provided content.

    +

    All available movies are currently seeded by 5 peers with high bandwidth (1Gbit) kindly provided by the NCIT-Cluster. Anyone that watches a movie will take part in the swarm and ensure greater availability to provided content.

    The Platform

    diff --git a/application/views/article/english/help.php b/application/views/article/english/help.php index 99a6494..da28fc4 100644 --- a/application/views/article/english/help.php +++ b/application/views/article/english/help.php @@ -1,77 +1,91 @@
    +

    Video Widget Snapshot

    - NextShare Video Widget Screenshot + NextShare Video Widget Screenshot
    +

    Click on a component bellow to highlight it on the snapshot above and view a description of it:

    +

    Video Widget Components

    -

    Watching Area

    +

    + Watching Area +

    Here you can watch the video.
    -

    Play / Pause button

    +

    + Play / Pause button +

    Toggle playing and pausing the video.
    -

    Current Time

    +

    + Current Time +

    - ... + View the time elapsed from the beginning of the video.
    -

    Total Time

    +

    + Total Time +

    - ... + View video duration.
    -

    Time Progress Slider

    +

    + Time Progress Slider +

    - ... + View a graphical representation of the time elapsed from the movie from its duration. You can also use this slider to seek current position in the video to a desired point.
    -

    Volume Slider

    +

    + Volume Slider +

    - ... + A graphical representation of the sound volume level which can be manipulated with the mouse in order change current volume.
    -

    Mute button

    +

    + Mute button +

    - ... + Use this button to alternatively disable or enable the sound for the video.
    -

    Switch Video Definition (Resolution)

    +

    + Switch Video Definition (Resolution) +

    - ... +

    This group of check buttons show definitions available for the video. The definition characterizes its resolution (number of pixels on horizontal and vertical). A definition is coded here, as in television systems, with a number, representing the number of vertical pixels (height), and a "p", which is an abbreviation from progressive scan.

    +

    The number of vertical pixels depends on the display aspect ratio which is usually 4:3 or 16:9. Because the video needs to fit in your browser its actual size (when not in Full Screen mode) will be between 640 and 1024 horizontal pixels.

    -

    Switch Video Plugin

    +

    + Switch Video Plugin +

    - ... + Use this two check buttons to switch between the two NextShare plug-ins available. Choose HTML5 for SwarmPlayer and VLC for NextSharePC.
    -

    Full Screen button

    +

    + Full Screen button +

    - ... + Displays the video on the whole screen without having to be limited by the web page.
    @@ -81,6 +95,7 @@ $(function() { $('#video-widget-titles').accordion({ collapsible: true, + autoHeight: false, active: false }); diff --git a/application/views/article/english/install-plugins.php b/application/views/article/english/install-plugins.php index 5ed9ce2..677278b 100644 --- a/application/views/article/english/install-plugins.php +++ b/application/views/article/english/install-plugins.php @@ -4,7 +4,7 @@
  • NextSharePC (based on VLC)
  • -

    SwarmPlayer

    +

    SwarmPlayer

    To install the SwarmPlayer video plugin (based on HTML5) visit P2P-Next's SwarmPlayer Site. You'll find a page such as the one in the screenshot below.

    @@ -13,7 +13,7 @@

    Find the green button labeled "Add Swarmplayer ...". Click it and follow the instructions.

    -

    NextSharePC

    +

    NextSharePC

    To install the NextSharePC video plugin (based on VLC) follow the steps below:

    1. If you are using ... diff --git a/application/views/header.php b/application/views/header.php index 3e9342d..dffaca3 100644 --- a/application/views/header.php +++ b/application/views/header.php @@ -32,4 +32,4 @@ endif ?> -
    + \ No newline at end of file diff --git a/application/views/video/watch_view.php b/application/views/video/watch_view.php index 9f7d091..11662fc 100644 --- a/application/views/video/watch_view.php +++ b/application/views/video/watch_view.php @@ -3,7 +3,7 @@ siteUrl = ''; -
    +
    -

    +

      @@ -125,14 +125,10 @@ type: "", src: , - - width: 427, - height: 240, showState: false, - - //minWidth: 640, - //maxWidth: 1024, + minWidth: 640, + maxWidth: 1024, initialDuration: "", resize: function() { diff --git a/css/default.css b/css/default.css index fac6909..ae58bc4 100644 --- a/css/default.css +++ b/css/default.css @@ -141,7 +141,7 @@ h1 width: 100%;*/ /* padding: 12px; */ margin: 0 auto; - width: 1024px; + width: 1056px; text-align: justify; } diff --git a/css/jquery-ui-1.8.15.custom.css b/css/jquery-ui-1.8.15.custom.css index b1195b7..e1cc621 100644 --- a/css/jquery-ui-1.8.15.custom.css +++ b/css/jquery-ui-1.8.15.custom.css @@ -60,7 +60,7 @@ .ui-widget .ui-widget { font-size: 1em; } .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Arial, Helvetica, sans-serif; font-size: 1em; } .ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; } -.ui-widget-content a { color: #333333; } +.ui-widget-content a { rgb(0,90,192); } .ui-widget-header { border: 1px solid #abd1ff; background: #005ac0 url(images/ui-bg_gloss-wave_80_005ac0_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; } .ui-widget-header a { color: #ffffff; } diff --git a/js/jquery.ui.imagemap.js b/js/jquery.ui.imagemap.js index a34a2c2..09475ff 100644 --- a/js/jquery.ui.imagemap.js +++ b/js/jquery.ui.imagemap.js @@ -29,6 +29,7 @@ $.widget( "ui.imagemap", { widget.$marker = $('
      ') .appendTo('div.ui-imagemap-image', widget.element); widget.$marker + .hide() .css('position', 'absolute') .css('outline', '2px solid red') .css('background', 'transparent'); @@ -42,7 +43,7 @@ $.widget( "ui.imagemap", { if (typeof $title.data('left') == 'undefined') return false; - var top = $title.data('top') + var top = $title.data('top'); var left = $title.data('left'); var width, height; @@ -56,6 +57,7 @@ $.widget( "ui.imagemap", { height = $title.data('height'); widget.$marker + .show() .css('top', top) .css('left', left) .css('width', width) diff --git a/js/jquery.ui.nsvideo.js b/js/jquery.ui.nsvideo.js index ec30d87..e556fda 100644 --- a/js/jquery.ui.nsvideo.js +++ b/js/jquery.ui.nsvideo.js @@ -385,7 +385,7 @@ $.widget( "ui.nsvideo", { if (widget.$video.width() < 640) { widget.element.css('width', - 427 + 8 + 'px');//TODO 640 + 8 + 640 + 8 + 'px'); widget.$video.css('left', Math.round(widget.$videoContainer.width()/2 - widget.$video.width()/2) -- 2.20.1