|
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
|
2 <html dir="ltr" xml:lang="fr" xmlns="http://www.w3.org/1999/xhtml" lang="fr"> |
|
3 |
|
4 <head> |
|
5 |
|
6 </head> |
|
7 |
|
8 <body> |
|
9 |
|
10 <div style="width:650px;font-family: 'Trebuchet MS', 'Helvetica', 'Arial', 'Verdana', 'sans-serif';"> |
|
11 <h1>MetaDataPlayer </h1> |
|
12 Test d'intégration du widget du gestionnaire de placement (avec Youtube). |
|
13 </div> |
|
14 |
|
15 |
|
16 <!-- START Integration ###################################### --> |
|
17 <!-- SIMPLE PLAYER EXPERIMENTATION --> |
|
18 <script type="text/javascript" src="../../build/LdtPlayer-release.js"></script> |
|
19 <script src="../../res/js/jquery.min.js"></script> |
|
20 <script src="../../res/js/jquery.tools.min.js"></script> |
|
21 <script src="../../res/js/jquery-ui.min.js"></script> |
|
22 |
|
23 <script type="text/javascript"> |
|
24 $(document).ready(function() { |
|
25 var config = { |
|
26 metadata:{ |
|
27 format:'cinelab', |
|
28 src:'test.json', |
|
29 load:'json'}, |
|
30 gui:{ |
|
31 width:512, |
|
32 height:384, |
|
33 mode:'radio', |
|
34 container:'LdtPlayer', |
|
35 debug:true, |
|
36 css:'../../src/css/LdtPlayer.css'}, |
|
37 player:{ |
|
38 type:'jwplayer', |
|
39 src:'../res/swf/player.swf'} |
|
40 }; |
|
41 |
|
42 IriSP.loadLibs(IriSP.lib, config.gui.css, function() {}); |
|
43 |
|
44 templ = "width: {{width}}px; height: {{height}}px; margin-bottom: 5px;"; |
|
45 var str = Mustache.to_html(templ, {width: config.gui.width, height: config.gui.height}); |
|
46 // Popcorn.youtube wants us to specify the size of the player in the style attribute of its container div. |
|
47 IriSP.jQuery("#video").attr("style", str); |
|
48 |
|
49 var pop = Popcorn.youtube("#video", "http://www.youtube.com/watch?v=lFtNG1wZ4zU", {controls: 0, autostart: false}); |
|
50 |
|
51 var dt = new IriSP.DataLoader(); |
|
52 var ser = new IriSP.JSONSerializer(dt, "../test.json"); |
|
53 var ser2 = new IriSP.JSONSerializer(dt, "../test.json"); |
|
54 |
|
55 var lay = new IriSP.LayoutManager({divId : "LdtPlayer"}); |
|
56 lay.setPopcornInstance(pop); |
|
57 |
|
58 //config.gui.container = lay.createDiv(); |
|
59 var player = new IriSP.PlayerWidget(pop, config, ser); |
|
60 |
|
61 config.gui.container = lay.createDiv(); |
|
62 var annotationWidget = new IriSP.AnnotationsWidget(pop, config, ser); |
|
63 |
|
64 config.gui.container = lay.createDiv(); |
|
65 var segmentsWidget = new IriSP.SegmentsWidget(pop, config, ser); |
|
66 ser.sync(function() { player.draw(); annotationWidget.draw(); segmentsWidget.draw();}); |
|
67 |
|
68 }); |
|
69 </script> |
|
70 <div id='video'> |
|
71 </div> |
|
72 |
|
73 <div id="LdtPlayer"> |
|
74 </div> |
|
75 <!-- END ################ ###################################### --> |
|
76 </body> |
|
77 </html> |