test/integration/polemic.require.js
branchrequire-js
changeset 239 9eb584fdfbe4
equal deleted inserted replaced
238:6008172a0592 239:9eb584fdfbe4
       
     1 require([], function() {
       
     2     $(document).ready(function() {
       
     3     var config = {            
       
     4         gui:{
       
     5             width:650,
       
     6             height:2100,              
       
     7             container:'LdtPlayer',
       
     8             css:'../../src/css/LdtPlayer.css',
       
     9             widgets: [
       
    10               {type: "PolemicWidget",
       
    11              width: 640, /* required for this widget */
       
    12              height: 50,
       
    13              heightmax: 50,
       
    14              metadata:{
       
    15               format:'cinelab',
       
    16               src:'polemic_fr.json',
       
    17               type:'json'},
       
    18               
       
    19              requires: [{
       
    20               type: "TooltipWidget",
       
    21               width: 180,
       
    22               heigh: 160,
       
    23               metadata : {
       
    24                 format:'cinelab',
       
    25                 src:'polemic.json',
       
    26                 type:'empty'
       
    27               }
       
    28              }],
       
    29             },
       
    30             {type: "PlayerWidget", // please note that type refers directly to the constructor of the widget.
       
    31              mode: "radio",
       
    32              metadata:{
       
    33               format:'cinelab',
       
    34               src:'polemic_fr.json',
       
    35               type:'json'}
       
    36             },
       
    37             {type: "SliderWidget",
       
    38 						 metadata:{
       
    39 						  format:'cinelab',
       
    40 						  src:'polemic_fr.json',
       
    41 						  type:'json'}
       
    42 						},
       
    43               
       
    44             ]
       
    45         },
       
    46       player:{
       
    47       type:'jwplayer', // player type
       
    48               container: 'PopcornContainer',
       
    49               // the rest is player-dependent configuration options.
       
    50               file : "video/ldtplatform/museologie_inaugurale_20111018_flat.f4v", 
       
    51               streamer: "rtmp://media.iri.centrepompidou.fr/ddc_player/", 
       
    52               flashplayer : '../libs/player.swf',
       
    53               live: true, 
       
    54               "controlbar.position" : "none", 
       
    55               height: 300, 
       
    56               width: 640, 
       
    57               provider: "rtmp" 
       
    58             }
       
    59     };
       
    60     
       
    61 
       
    62     var layoutManager = new IriSP.LayoutManager(config.gui.container);
       
    63     var pop = IriSP.configurePopcorn(layoutManager, config.player);
       
    64     
       
    65     var widgets = IriSP.configureWidgets(pop, layoutManager, config.gui); });
       
    66 });