test/integration/index.htm
branchpopcorn-port
changeset 209 63501d879bce
parent 88 4de2f474ca01
equal deleted inserted replaced
208:49c7eec0955d 209:63501d879bce
    21 	<script src="../../res/js/jquery-ui.min.js"></script>
    21 	<script src="../../res/js/jquery-ui.min.js"></script>
    22 	<div id="LdtPlayer"></div>
    22 	<div id="LdtPlayer"></div>
    23 	
    23 	
    24 	<script  type="text/javascript">
    24 	<script  type="text/javascript">
    25 		$(document).ready(function() {
    25 		$(document).ready(function() {
    26 		var config = {
    26       var config = {
    27 						metadata:{
       
    28 							format:'cinelab',
       
    29 							src:'test.json',
       
    30 							load:'json'},
       
    31 						gui:{
    27 						gui:{
    32 							width:650,
    28 							width:650,
    33 							height:1,
    29 							height:1,
    34 							mode:'radio',
    30 							mode:'video',
    35 							container:'LdtPlayer',
    31 							container:'LdtPlayer',
    36 							debug:true,
    32 							debug:true,
    37 							css:'../../src/css/LdtPlayer.css'},
    33 							css:'../../src/css/LdtPlayer.css',
       
    34               widgets : [{ 
       
    35                   type: "PlayerWidget", // please note that type refers directly to the constructor of the widget.
       
    36                   mode: "radio",
       
    37                   metadata:{
       
    38                   format:'cinelab',
       
    39                   src:'../test.json',
       
    40                   type:'json'}
       
    41               }]},
    38 						player:{
    42 						player:{
    39 							type:'jwplayer',
    43 							type:'html5',							
    40 							src:'../res/swf/player.swf'}
    44               file:'../trailer.ogv',
       
    45               duration: 50}
    41 					};
    46 					};
    42 		
    47 		
    43 		IriSP.loadLibs(IriSP.lib, config.gui.css, function() {});     
    48       IriSP.loadLibs(IriSP.lib, config.gui.css, function() { 	
    44 		pop = Popcorn("#video");    
    49           var layoutManager = new IriSP.LayoutManager(config.gui.container);
    45 		dt = new IriSP.DataLoader();
    50           var pop = IriSP.configurePopcorn(layoutManager, config.player);
    46 		ser = new IriSP.JSONSerializer(dt, "../test.json");
    51           
    47 		var player = new IriSP.PlayerWidget(pop, config, ser);
    52           var widgets = IriSP.configureWidgets(pop, layoutManager, config.gui); });
    48 		var annotationWidget = new IriSP.AnnotationsWidget(pop, config, ser);
    53 
    49 		ser.sync(function() { player.draw();  annotationWidget.draw(); });
    54     });
    50 		});
       
    51 	</script>
    55 	</script>
    52 	
    56   
    53  <video id='video'
       
    54     style="display:;width:300px"
       
    55     controls
       
    56     preload="auto">
       
    57 
       
    58     <source id='mp4'
       
    59       src="../trailer.mp4"
       
    60       type='video/mp4; codecs="avc1, mp4a"'>
       
    61 
       
    62     <source id='ogv'
       
    63       src="../trailer.ogv"
       
    64       type='video/ogg; codecs="theora, vorbis"'>
       
    65       
       
    66     <source id='webm'
       
    67       src="../trailer.webm"
       
    68       type='video/webm; codecs="vp8, vorbis"'>
       
    69 
       
    70     <p>Your user agent does not support the HTML5 Video element.</p>
       
    71 
       
    72   </video>
       
    73  </body>
    57  </body>
    74  </html>
    58  </html>