a minor change popcorn-port
authorveltr
Thu, 19 Jan 2012 15:13:17 +0100
branchpopcorn-port
changeset 725 067002a5131d
parent 724 94d5d81d3161
child 726 2c0bd0671707
a minor change
src/js/site.js
src/js/widgets/tagCloudWidget.js
test/integration/polemic-festival.htm
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/js/site.js	Thu Jan 19 15:13:17 2012 +0100
@@ -0,0 +1,80 @@
+/* site.js - all our site-dependent config : player chrome, cdn locations, etc...*/
+
+IriSP.libdir = "/metadataplayer/src/js/libs/";
+IriSP.jwplayer_swf_path = "/metadataplayer/test/libs/player.swf";
+IriSP.platform_url = "http://192.168.56.101/pf";
+
+IriSP.lib = { 
+		jQuery : "http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js",
+		jQueryUI : "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/jquery-ui.js",
+		jQueryToolTip : "http://cdn.jquerytools.org/1.2.4/all/jquery.tools.min.js",
+		swfObject : "http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js",
+		cssjQueryUI : "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/base/jquery-ui.css",
+    popcorn : IriSP.libdir + "popcorn.js",
+    jwplayer : IriSP.libdir + "jwplayer.js",
+    popcornReplacement: IriSP.libdir + "pop.js",
+    raphael: IriSP.libdir + "raphael.js",
+    jquery_sparkline: IriSP.libdir + "jquery.sparkline.js",
+    "popcorn.mediafragment" : IriSP.libdir + "popcorn.mediafragment.js",
+    "popcorn.code" : IriSP.libdir + "popcorn.code.js",
+    "popcorn.jwplayer": IriSP.libdir + "popcorn.jwplayer.js",
+    "popcorn.youtube": IriSP.libdir + "popcorn.youtube.js"    
+};
+
+//Configuration for the player and utility functions.
+IriSP.config = {};
+
+IriSP.config.shortener = {
+  // function to call to shorten an url.
+  //shortening_function : IriSP.platform_shorten_url
+};
+
+IriSP.widgetsDefaults = {
+  "LayoutManager" : {spacer_div_height : "0px" },
+  "PlayerWidget" : {},
+  "AnnotationsWidget": {
+    "share_text" : "I'm watching ",     
+    "fb_link" : "http://www.facebook.com/share.php?u=",
+    "tw_link" : "http://twitter.com/home?status=",
+    "gplus_link" : ""
+    },
+  "TweetsWidget" : {
+      default_profile_picture : "https://si0.twimg.com/sticky/default_profile_images/default_profile_1_normal.png",
+      tweet_display_period: 10000, // how long do we show a tweet ?
+      
+  },
+  "SliderWidget" : {
+      minimize_period: 850 // how long does the slider stays maximized after the user leaves the zone ?
+  },
+  "createAnnotationWidget" : {
+      keywords: ["#faux-raccord", "#mot-clef"],
+      cinecast_version: true /* put to false to enable the platform version, true for the festival cinecast one. */
+  },
+  "SparklineWidget" : {
+      column_width: 10 // the width of a column in pixels.
+  },
+  "Main" : {
+      autoplay: true
+  },
+  "AnnotationsListWidget" : {
+      ajax_mode: true, /* use ajax to get information about the annotations.
+                         if set to false, only search in the annotations for the
+                         current project. */
+      ajax_url: IriSP.platform_url + "ldtplatform/api/ldt/segments/", /* partial
+                                                                         url of 
+                                                                         where to
+                                                                         get the 
+                                                                         ajax */
+      ajax_granularity: 10000 /* how much ms should we look before and after the
+                                 current timecode */
+  }, 
+};
+
+IriSP.paths = {
+//  "imgs": "/tweetlive/res/metadataplayer/src/css/imgs"
+  "imgs": "/metadataplayer/src/css/imgs"
+};
+IriSP.default_templates_vars = {
+  "img_dir" : IriSP.paths.imgs 
+};
+
--- a/src/js/widgets/tagCloudWidget.js	Thu Jan 26 17:21:04 2012 +0100
+++ b/src/js/widgets/tagCloudWidget.js	Thu Jan 19 15:13:17 2012 +0100
@@ -9,7 +9,7 @@
     var _stopwords = [
             'aussi', 'and', 'avec', 'aux', 'car', 'cette', 'comme', 'dans', 'donc', 'des', 'elle', 'est',
             'être', 'eux', 'fait', 'ici', 'ils', 'les', 'leur', 'leurs', 'mais', 'mes', 'même', 'mon', 'notre',
-            'nos', 'nous', 'ont', 'par', 'pas', 'peu', 'pour', 'que', 'qui', 'ses' ,'son', 'sont', 'sur',
+            'non', 'nos', 'nous', 'ont', 'par', 'pas', 'peu', 'pour', 'que', 'qui', 'ses' ,'son', 'sont', 'sur',
             'tes', 'très', 'the', 'ton', 'tous', 'tout', 'une', 'votre', 'vos', 'vous'
         ],
         _regexpword = /[^\s\.&;,'"!\?\d\(\)\+\[\]\\\…\-«»:\/]{3,}/g,
--- a/test/integration/polemic-festival.htm	Thu Jan 26 17:21:04 2012 +0100
+++ b/test/integration/polemic-festival.htm	Thu Jan 19 15:13:17 2012 +0100
@@ -21,50 +21,79 @@
   <div id="LdtPlayer"></div>
   <div id="Sparkline"></div>
   <script  type="text/javascript">
-    var platf_url = "http://localhost/pf/ldtplatform/ldt/";
-    var project_id = "47e3eef0-3ab4-11e1-9423-001d7d7c6d1d";
-    IriSP.widgetsDefaults.AnnotationsListWidget.ajax_mode = false;
-    IriSP.widgetsDefaults.createAnnotationWidget.cinecast_version = true;
-    
+    var platf_url = "http://192.168.56.101/pf/ldtplatform/ldt/",
+        project_id = "bb18dcdc-41bc-11e1-91b2-08002791f1b7",
+        json_url = platf_url + 'cljson/id/' + project_id;
     var config = {            
         gui:{
             width:650,
             height:2100,              
             container:'LdtPlayer',
             css:'../../src/css/LdtPlayer.css',
-            widgets: [            
+            widgets: [
+            {type: "StackGraphWidget",
+                tags : [
+                    {
+                        "keywords" : [ "élève", "souleyman", "souleiman", "koumba", "kumba", "karl", "esmeralda" ],
+                        "description" : "Mentions des élèves",
+                        "color" : "#CE0A15",
+                    },
+                    {
+                        "keywords" : [ "F.M", "françois" ],
+                        "description" : "Mentions de François",
+                        "color" : "#036AAE",
+                    },
+                    {
+                        "keywords" : [ "plan", "pano", "caméra", "plongée" ],
+                        "description" : "Descriptions de plans",
+                        "color" : "#C5A62D",   
+                    },
+                ],
+               metadata:{
+                format:'cinelab',
+                src: json_url,
+                type:'json'},
+                
+               requires: [{
+                type: "TooltipWidget",
+                width: 180,
+                heigh: 160,
+                metadata : {type:'empty'
+                }
+               }],
+            },            
             {type: "AnnotationsListWidget",
              container: "AnnotationsListContainer",             
-						 metadata:{
-						  format:'cinelab',
-						  src:platf_url + 'cljson/id/' + project_id,
-						  type:'json'}
-						},
+                         metadata:{
+                          format:'cinelab',
+                          src:json_url,
+                          type:'json'}
+                        },
             {type: "SparklineWidget",
              width: 640, /* required for this widget */
              height: 50,            
-						 metadata:{
-						  format:'cinelab',
-						  src:platf_url + 'cljson/id/' + project_id,
-						  type:'json'}
-						},
+                         metadata:{
+                          format:'cinelab',
+                          src:json_url,
+                          type:'json'}
+                        },
             {type: "SliderWidget",
-						 metadata:{
-						  format:'cinelab',
-						  src:platf_url + 'cljson/id/' + project_id,
-						  type:'json'}
-						},        
+                         metadata:{
+                          format:'cinelab',
+                          src:json_url,
+                          type:'json'}
+                        },        
             {type: "PlayerWidget", // please note that type refers directly to the constructor of the widget.
              mode: "radio",
              metadata:{
               format:'cinelab',
-              src:platf_url + 'cljson/id/' + project_id,
+              src:json_url,
               type:'json'}
             },
             {type: "SegmentsWidget",
              metadata:{
               format:'cinelab',
-              src:platf_url + 'cljson/id/' + project_id,
+              src:json_url,
               type:'json'},
              requires: [{
               type: "TooltipWidget",
@@ -78,21 +107,21 @@
             {type: "ArrowWidget",
              metadata:{
               format:'cinelab',
-              src:platf_url + 'cljson/id/' + project_id,
+              src:json_url,
               type:'json'}
             },
             {type: "TweetsWidget",
-						 metadata:{
-						  format:'cinelab',
-						  src:platf_url + 'cljson/id/' + project_id,
-						  type:'json'}
-						},
+                         metadata:{
+                          format:'cinelab',
+                          src:json_url,
+                          type:'json'}
+                        },
             {type: "createAnnotationWidget",
-						 metadata:{
-						  format:'cinelab',
-						  src:platf_url + 'cljson/id/' + project_id,
-						  type:'json'}
-						}      
+                         metadata:{
+                          format:'cinelab',
+                          src:json_url,
+                          type:'json'}
+                        }      
             ]
         },
       player:{
@@ -104,15 +133,15 @@
       },
       modules: [
                { type: "MediaFragment",
-  			     		 metadata:{
-	  	  			   format:'cinelab',
-		  				   src:platf_url + 'cljson/id/' + project_id,
-						     type:'json'}
-						}]
+                         metadata:{
+                       format:'cinelab',
+                           src:json_url,
+                             type:'json'}
+                        }]
 
     };
     
-    IriSP.loadLibs(IriSP.lib, config, platf_url + 'cljson/id/' + project_id,
+    IriSP.loadLibs(IriSP.lib, config, json_url,
       function() {   
               var layoutManager = new IriSP.LayoutManager(config.gui.container);
               var pop = IriSP.configurePopcorn(layoutManager, config.player);