test/integration/polemic-platform.htm
branchpopcorn-port
changeset 695 8bcde739ab93
parent 665 372852c77e6d
child 704 235190848d7d
equal deleted inserted replaced
694:528626981afe 695:8bcde739ab93
    20   <div id="video"></div>
    20   <div id="video"></div>
    21   <div id="LdtPlayer"></div>
    21   <div id="LdtPlayer"></div>
    22   <div id="Sparkline"></div>
    22   <div id="Sparkline"></div>
    23   <script  type="text/javascript">
    23   <script  type="text/javascript">
    24     var platf_url = "http://localhost/pf/ldtplatform/ldt/";
    24     var platf_url = "http://localhost/pf/ldtplatform/ldt/";
    25     //var project_id = "47e3eef0-3ab4-11e1-9423-001d7d7c6d1d";
    25     var project_id = "47e3eef0-3ab4-11e1-9423-001d7d7c6d1d";
    26     http://localhost/pf/ldtplatform/ldt/cljson/id/
    26     //http://localhost/pf/ldtplatform/ldt/cljson/id/
    27     var project_id = "1771a6cf-3dfd-11e1-a3d8-001d7d7c6d1d";
    27     //var project_id = "1771a6cf-3dfd-11e1-a3d8-001d7d7c6d1d";
       
    28     //var project_id = "1771a6cf-3dfd-11e1-a3d8-001d7d7c6d1d";
       
    29     var json_src = platf_url + "cljson/id/" + project_id;
    28     
    30     
    29     IriSP.widgetsDefaults["createAnnotationWidget"].cinecast_version = false;
    31     IriSP.widgetsDefaults["createAnnotationWidget"].cinecast_version = false;
    30     var config = {            
    32     var config = {            
    31         gui:{
    33         gui:{
    32             width:650,        
    34             width:650,        
    36              {type: "PolemicWidget",
    38              {type: "PolemicWidget",
    37                width: 640, /* required for this widget */
    39                width: 640, /* required for this widget */
    38                height: 50,
    40                height: 50,
    39                metadata:{
    41                metadata:{
    40                 format:'cinelab',
    42                 format:'cinelab',
    41                 src:platf_url + 'cljson/id/' + project_id,
    43                 src:json_src,
    42                 type:'json'},
    44                 type:'json'},
    43                 
    45                 
    44                requires: [{
    46                requires: [{
    45                 type: "TooltipWidget",
    47                 type: "TooltipWidget",
    46                 width: 180,
    48                 width: 180,
    47                 heigh: 160,
    49                 heigh: 160,
    48                 metadata : {
    50                 metadata : {
    49                   format:'cinelab',
    51                   format:'cinelab',
    50                   src:platf_url + 'cljson/id/' + project_id,
    52                   src:json_src,
    51                   type:'empty'
    53                   type:'empty'
    52                 }
    54                 }
    53                }],
    55                }],
    54             },                      
    56             },                      
    55             {type: "AnnotationsListWidget",
    57             {type: "AnnotationsListWidget",
    56              container: "AnnotationsListContainer",             
    58              container: "AnnotationsListContainer",             
    57 						 metadata:{
    59 						 metadata:{
    58 						  format:'cinelab',
    60 						  format:'cinelab',
    59 						  src:platf_url + 'cljson/id/' + project_id,
    61 						  src:json_src,
    60 						  type:'json'}
    62 						  type:'json'}
    61 						},
    63 						},
    62             {type: "SparklineWidget",
    64             {type: "SparklineWidget",
    63              width: 640, /* required for this widget */
    65              width: 640, /* required for this widget */
    64              height: 50,            
    66              height: 50,            
    65 						 metadata:{
    67 						 metadata:{
    66 						  format:'cinelab',
    68 						  format:'cinelab',
    67 						  src:platf_url + 'cljson/id/' + project_id,
    69 						  src:json_src,
    68 						  type:'json'}
    70 						  type:'json'}
    69 						},
    71 						},
       
    72             {   type: "StackGraphWidget",
       
    73                 metadata: {
       
    74                     format:'cinelab',
       
    75                     src:json_src,
       
    76                     type:'json'
       
    77                 },requires: [{
       
    78                   type: "TooltipWidget",
       
    79                   width: 180,
       
    80                   heigh: 160,
       
    81                   metadata : {
       
    82                     type:'empty'
       
    83                   }
       
    84                   }]
       
    85             },
    70             {type: "SliderWidget",
    86             {type: "SliderWidget",
    71 						 metadata:{
    87 						 metadata:{
    72 						  format:'cinelab',
    88 						  format:'cinelab',
    73 						  src:platf_url + 'cljson/id/' + project_id,
    89 						  src:json_src,
    74 						  type:'json'}
    90 						  type:'json'}
    75 						},  
    91 						},  
    76             {type: "PlayerWidget", // please note that type refers directly to the constructor of the widget.
    92             {type: "PlayerWidget", // please note that type refers directly to the constructor of the widget.
    77              mode: "radio",
    93              mode: "radio",
    78              metadata:{
    94              metadata:{
    79               format:'cinelab',
    95               format:'cinelab',
    80               src:platf_url + 'cljson/id/' + project_id,
    96               src:json_src,
    81               type:'json'}
    97               type:'json'}
    82             },
    98             },
    83             {type: "SegmentsWidget",
    99             {type: "SegmentsWidget",
    84              metadata:{
   100              metadata:{
    85               format:'cinelab',
   101               format:'cinelab',
    86               src:platf_url + 'cljson/id/' + project_id,
   102               src:json_src,
    87               type:'json'},
   103               type:'json'},
    88              requires: [{
   104              requires: [{
    89               type: "TooltipWidget",
   105               type: "TooltipWidget",
    90               width: 180,
   106               width: 180,
    91               heigh: 160,
   107               heigh: 160,
    95              }],
   111              }],
    96             },            
   112             },            
    97             {type: "SliceWidget",
   113             {type: "SliceWidget",
    98              metadata:{
   114              metadata:{
    99               format:'cinelab',
   115               format:'cinelab',
   100               src:platf_url + 'cljson/id/' + project_id,
   116               src:json_src,
   101               type:'json'}
   117               type:'json'}
   102             },            
   118             },            
   103             {type: "ArrowWidget",
   119             {type: "ArrowWidget",
   104              metadata:{
   120              metadata:{
   105               format:'cinelab',
   121               format:'cinelab',
   106               src:platf_url + 'cljson/id/' + project_id,
   122               src:json_src,
   107               type:'json'}
   123               type:'json'}
   108             },
   124             },
   109 
   125 
   110 
   126 
   111             {type: "AnnotationsWidget",
   127             {type: "AnnotationsWidget",
   112 						 metadata:{
   128 						 metadata:{
   113 						  format:'cinelab',
   129 						  format:'cinelab',
   114 						  src:platf_url + 'cljson/id/' + project_id,
   130 						  src:json_src,
   115 						  type:'json'}
   131 						  type:'json'}
   116 						},
   132 						},
   117             {type: "TweetsWidget",
   133             {type: "TweetsWidget",
   118 						 metadata:{
   134 						 metadata:{
   119 						  format:'cinelab',
   135 						  format:'cinelab',
   120 						  src:platf_url + 'cljson/id/' + project_id,
   136 						  src:json_src,
   121 						  type:'json'}
   137 						  type:'json'}
   122 						},
   138 						},
   123             {type: "createAnnotationWidget",
   139             {type: "createAnnotationWidget",
   124 						 metadata:{
   140 						 metadata:{
   125 						  format:'cinelab',
   141 						  format:'cinelab',
   126 						  src:platf_url + 'cljson/id/' + project_id,
   142 						  src:json_src,
   127 						  type:'json'}
   143 						  type:'json'}
   128 						}      
   144 						}      
   129             ]
   145             ]
   130         },
   146         },
   131       player:{
   147       player:{
   137       },
   153       },
   138       modules: [
   154       modules: [
   139                { type: "MediaFragment",
   155                { type: "MediaFragment",
   140   			     		 metadata:{
   156   			     		 metadata:{
   141 	  	  			   format:'cinelab',
   157 	  	  			   format:'cinelab',
   142 		  				   src:platf_url + 'cljson/id/' + project_id,
   158 		  				   src:json_src,
   143 						     type:'json'}
   159 						     type:'json'}
   144 						}]
   160 						}]
   145 
   161 
   146     };
   162     };
   147     
   163     
   148     IriSP.loadLibs(IriSP.lib, config, platf_url + 'cljson/id/' + project_id,
   164     IriSP.loadLibs(IriSP.lib, config, json_src,
   149       function() {   
   165       function() {   
   150               var layoutManager = new IriSP.LayoutManager(config.gui.container);
   166               var layoutManager = new IriSP.LayoutManager(config.gui.container);
   151               var pop = IriSP.configurePopcorn(layoutManager, config.player);
   167               var pop = IriSP.configurePopcorn(layoutManager, config.player);
   152               
   168               
   153               var widgets = IriSP.configureWidgets(pop, layoutManager, config.gui); 
   169               var widgets = IriSP.configureWidgets(pop, layoutManager, config.gui);