test/integration/polemic.require.js
author hamidouk
Mon, 14 Nov 2011 17:19:49 +0100
branchrequire-js
changeset 239 9eb584fdfbe4
permissions -rw-r--r--
added basic integration tests for require.js

require([], function() {
    $(document).ready(function() {
    var config = {            
        gui:{
            width:650,
            height:2100,              
            container:'LdtPlayer',
            css:'../../src/css/LdtPlayer.css',
            widgets: [
              {type: "PolemicWidget",
             width: 640, /* required for this widget */
             height: 50,
             heightmax: 50,
             metadata:{
              format:'cinelab',
              src:'polemic_fr.json',
              type:'json'},
              
             requires: [{
              type: "TooltipWidget",
              width: 180,
              heigh: 160,
              metadata : {
                format:'cinelab',
                src:'polemic.json',
                type:'empty'
              }
             }],
            },
            {type: "PlayerWidget", // please note that type refers directly to the constructor of the widget.
             mode: "radio",
             metadata:{
              format:'cinelab',
              src:'polemic_fr.json',
              type:'json'}
            },
            {type: "SliderWidget",
						 metadata:{
						  format:'cinelab',
						  src:'polemic_fr.json',
						  type:'json'}
						},
              
            ]
        },
      player:{
      type:'jwplayer', // player type
              container: 'PopcornContainer',
              // the rest is player-dependent configuration options.
              file : "video/ldtplatform/museologie_inaugurale_20111018_flat.f4v", 
              streamer: "rtmp://media.iri.centrepompidou.fr/ddc_player/", 
              flashplayer : '../libs/player.swf',
              live: true, 
              "controlbar.position" : "none", 
              height: 300, 
              width: 640, 
              provider: "rtmp" 
            }
    };
    

    var layoutManager = new IriSP.LayoutManager(config.gui.container);
    var pop = IriSP.configurePopcorn(layoutManager, config.player);
    
    var widgets = IriSP.configureWidgets(pop, layoutManager, config.gui); });
});