web/player_embed.php
changeset 620 953c68b4da79
parent 535 8276f3ff7a3f
child 621 44f90de0016f
equal deleted inserted replaced
619:170f46b3b318 620:953c68b4da79
    52         }
    52         }
    53         <?php else: ?>
    53         <?php else: ?>
    54         var metadatas = { metadata: {url: "<?php echo($translate->_('config__metadata'));?>", duration: <?php echo($translate->_('config__duration'))?>} };
    54         var metadatas = { metadata: {url: "<?php echo($translate->_('config__metadata'));?>", duration: <?php echo($translate->_('config__duration'))?>} };
    55         var metadata_key = "metadata";
    55         var metadata_key = "metadata";
    56         <?php endif;?>
    56         <?php endif;?>
    57     IriSP.libdir = "<?php echo(registry_url('libdir','js'));?>";
    57     IriSP.libFiles.defaultDir = "<?php echo(registry_url('libdir','js'));?>";
       
    58     IriSP.widgetsDir = "<?php echo(registry_url('ldtwidgets','js'));?>";
    58     IriSP.jwplayer_swf_path = "<?php echo(URL_ROOT); ?>res/mediaplayer/player.swf";
    59     IriSP.jwplayer_swf_path = "<?php echo(URL_ROOT); ?>res/mediaplayer/player.swf";
    59     IriSP.platform_url = "http://ldt.iri.centrepompidou.fr/";
    60     IriSP.language = "<?php echo($actual) ?>";
    60     var json_url = metadatas[metadata_key].url;
    61     
    61 
    62     var _metadata = {
    62     var config = {            
    63         url: metadatas[metadata_key].url + '?callback=?',
    63         gui:{
    64         format: 'ldt'
    64             width:650,
    65     };
    65             height:800,              
    66     var _config = {            
    66             container:'LdtPlayer',
    67         gui: {
       
    68             width: 630,
       
    69             container: 'LdtPlayer',
       
    70             default_options: {
       
    71                 metadata: _metadata
       
    72             },
    67             css:'<?php echo(registry_url('metadataplayer','css'));?>',
    73             css:'<?php echo(registry_url('metadataplayer','css'));?>',
    68             default_options : {
       
    69                 metadata:{
       
    70                 format:'cinelab',
       
    71                 src: json_url,
       
    72                 type:'json'},
       
    73                 width: 650
       
    74             },
       
    75             widgets: [
    74             widgets: [
    76             {type: "PolemicWidget",
    75                 { type: "Polemic" },
    77                requires: [{
    76                 { type: "Slider" },
    78                 type: "TooltipWidget",
    77                 {
    79                 width: 180,
    78                     type: "Controller",
    80                 height: 160,
    79                     disable_annotate_btn: true
    81                 metadata : {type:'empty'
    80                 },
    82                 }
    81                 { type: "Segments" },
    83                }],
    82                 { type: "Arrow" },
    84                height: 75
    83                 { type: "Annotation" },
    85             },
    84                 { type: "Tweet" },
    86             {type: "SliderWidget"},        
    85                 { type: "Mediafragment"}
    87             {type: "PlayerWidget", // please note that type refers directly to the constructor of the widget.
       
    88              mode: "radio"},
       
    89             {type: "SegmentsWidget",
       
    90              requires: [{
       
    91               type: "TooltipWidget",
       
    92               width: 180,
       
    93               height: 160,
       
    94               }],
       
    95                 width: 650
       
    96             },                      
       
    97             {type: "ArrowWidget"},
       
    98             {type: "TweetsWidget"},
       
    99             {type: "AnnotationsWidget"}
       
   100             ]
    86             ]
   101         },
    87         },
   102       player:{
    88         player:{
   103           type:'jwplayer',
    89             type:'jwplayer', // player type
   104           live: true, 
    90             live: true, 
   105           height: 400, 
    91             height: 300, 
   106           width: 650, 
    92             width: 630, 
   107           provider: "rtmp" 
    93             provider: "rtmp",
   108       },
    94             autostart: true
   109       modules: [
    95         }
   110                { type: "MediaFragment",
       
   111                          metadata:{
       
   112                        format:'cinelab',
       
   113                            src:json_url,
       
   114                              type:'json'}
       
   115                         }]
       
   116 
       
   117     };
    96     };
   118     </script>
    97     </script>
   119     <script type="text/javascript">
    98     <script type="text/javascript">
   120         var _gaq = _gaq || [];
    99         var _gaq = _gaq || [];
   121         _gaq.push(['_setAccount', 'UA-23581291-1']);
   100         _gaq.push(['_setAccount', 'UA-23581291-1']);
   131 	<style type="text/css">
   110 	<style type="text/css">
   132 		body{
   111 		body{
   133 			padding:0px;
   112 			padding:0px;
   134 			margin:0px;
   113 			margin:0px;
   135 		}
   114 		}
   136 
   115     	#LdtPlayer {
       
   116     	    margin-bottom: 2px;
       
   117     	}
   137 	</style>
   118 	</style>
   138 	<script type="text/javascript">
   119 	<script type="text/javascript">
   139 		var _gaq = _gaq || [];
   120 		var _gaq = _gaq || [];
   140 		_gaq.push(['_setAccount', 'UA-23581291-1']);
   121 		_gaq.push(['_setAccount', 'UA-23581291-1']);
   141 		_gaq.push(['_trackPageview', location.pathname + location.search + location.hash]);
   122 		_gaq.push(['_trackPageview', location.pathname + location.search + location.hash]);
   149 	</script>
   130 	</script>
   150   </head>
   131   </head>
   151   
   132   
   152         <div id="LdtPlayer"></div>
   133         <div id="LdtPlayer"></div>
   153 <script type="text/javascript">
   134 <script type="text/javascript">
   154     IriSP.initPlayer(config, json_url);
   135     var _myPlayer = new IriSP.Metadataplayer(_config, _metadata);
   155 </script>
   136 </script>
   156   </body>
   137   </body>
   157 </html>
   138 </html>