24 <div id="LdtPlayer"></div> |
24 <div id="LdtPlayer"></div> |
25 |
25 |
26 <script type="text/javascript"> |
26 <script type="text/javascript"> |
27 $(document).ready(function() { |
27 $(document).ready(function() { |
28 var config = { |
28 var config = { |
29 metadata:{ |
|
30 format:'cinelab', |
|
31 src:'test.json', |
|
32 load:'json'}, |
|
33 gui:{ |
29 gui:{ |
34 width:650, |
30 width:650, |
35 height:1, |
31 height:1, |
36 mode:'video', |
32 mode:'video', |
37 container:'LdtPlayer', |
33 container:'LdtPlayer', |
38 debug:true, |
34 debug:true, |
39 css:'../../src/css/LdtPlayer.css'}, |
35 css:'../../src/css/LdtPlayer.css', |
|
36 widgets : [{ |
|
37 type: "PlayerWidget", // please note that type refers directly to the constructor of the widget. |
|
38 mode: "radio", |
|
39 metadata:{ |
|
40 format:'cinelab', |
|
41 src:'../test.json', |
|
42 type:'json'} |
|
43 }]}, |
40 player:{ |
44 player:{ |
41 type:'jwplayer', |
45 type:'jwplayer', |
42 src:'../res/swf/player.swf'} |
46 flashplayer:'../../res/swf/player.swf', |
|
47 file:'http://127.0.0.1/mdp/test/trailer.mp4', |
|
48 provider:'video', |
|
49 duration: 50} |
43 }; |
50 }; |
44 |
51 |
45 IriSP.loadLibs(IriSP.lib, config.gui.css, function() {}); |
52 IriSP.loadLibs(IriSP.lib, config.gui.css, function() { |
46 var pop = Popcorn.jwplayer( '#video', "", {"file" : "../trailer.mp4", "duration" : 40, "flashplayer" : "../../res/swf/player.swf"}); |
53 var layoutManager = new IriSP.LayoutManager(config.gui.container); |
47 //pop.pause(); |
54 var pop = IriSP.configurePopcorn(layoutManager, config.player); |
48 dt = new IriSP.DataLoader(); |
55 |
49 ser = new IriSP.JSONSerializer(dt, "../test.json"); |
56 var widgets = IriSP.configureWidgets(pop, layoutManager, config.gui); }); |
50 ser2 = new IriSP.JSONSerializer(dt, "../test.json"); |
57 |
51 var player = new IriSP.PlayerWidget(pop, config, ser); |
58 }); |
52 var annotationWidget = new IriSP.AnnotationsWidget(pop, config, ser); |
|
53 |
|
54 ser.sync(function() { player.draw(); annotationWidget.draw(); }); |
|
55 /* |
|
56 var annotationBar = new IriSP.AnnotationWidget(pop, config, ser); |
|
57 ser.sync(IriSP.wrap(annotationBar, draw)); |
|
58 */ |
|
59 }); |
|
60 </script> |
59 </script> |
61 |
60 |
62 |
61 |
63 </body> |
62 </body> |
64 </html> |
63 </html> |