1 <!doctype html> |
|
2 <html> |
|
3 <head> |
|
4 <title>Preuve de concept Mashup</title> |
|
5 <link rel="stylesheet" type="text/css" href="style.css" /> |
|
6 <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> |
|
7 <script type="text/javascript" src="../metadataplayer/LdtPlayer-core.js" type="text/javascript"></script> |
|
8 </head> |
|
9 <body> |
|
10 <div class="main-container"> |
|
11 <div class="header"> |
|
12 <h1>Hash Cut #</h1> |
|
13 </div> |
|
14 <div class="steps"> |
|
15 <h2>Créer un Hash-cut en 3 étapes :</h2> |
|
16 <div class="steps-frame"> |
|
17 <div class="step"> |
|
18 <div class="step-icon step-1"></div> |
|
19 <div class="step-title">S'inscrire et<br />créer un projet</div> |
|
20 </div> |
|
21 <div class="step-separator"></div> |
|
22 <div class="step"> |
|
23 <div class="step-icon step-2"></div> |
|
24 <div class="step-title">Découper et<br />Assembler</div> |
|
25 </div> |
|
26 <div class="step-separator"></div> |
|
27 <div class="step active"> |
|
28 <div class="step-icon step-3"></div> |
|
29 <div class="step-title">Partager et<br />regarder !</div> |
|
30 </div> |
|
31 </div> |
|
32 </div> |
|
33 <div class="colgauche"> |
|
34 <h2>Mon HashCut (ne fonctionne pas avec Firefox)</h2> |
|
35 <hr /> |
|
36 <div id="LdtPlayer"></div> |
|
37 </div> |
|
38 <div class="coldroite"> |
|
39 <div id="mediaList"></div> |
|
40 <h2>Annotations</h2> |
|
41 <hr /> |
|
42 <div id="annotationList"></div> |
|
43 </div> |
|
44 <div class="footer"> |
|
45 <hr /> |
|
46 <p style="text-align: right;">© IRI 2012</p> |
|
47 </div> |
|
48 </div> |
|
49 <script type="text/javascript"> |
|
50 |
|
51 function url_transform_func(_url){ |
|
52 //_url = "rtmp://media.iri.centrepompidou.fr/ddc_player/mp4:video/ldtplatform/rsln_clay_shirky"; |
|
53 // We change the streamer if needed |
|
54 var _transformed = _url.replace(/^rtmp:\/\/media.iri.centrepompidou.fr\/ddc_player\/(mp4:)?video\//i,"http://media.iri.centrepompidou.fr/video/"); |
|
55 // Get the file name (= remove extension if necessary) |
|
56 ext = _transformed.substr(_transformed.lastIndexOf('.')+1).toLowerCase(); |
|
57 if(ext=="mp4" || ext=="f4v" || ext=="flv" || ext=="mov" || ext=="webm" || ext=="mpg4" || ext=="ogv" || ext=="ogg" || ext=="avi"){ |
|
58 _transformed = _transformed.substr(0, _transformed.lastIndexOf('.')); |
|
59 } |
|
60 // now that the file name is clean, we add all the extension and mimetype |
|
61 srcTypeArray = [ |
|
62 {src:_transformed+".mp4", type:"video/mp4"}, |
|
63 {src:_transformed+".ogv", type:"video/ogg"}, |
|
64 {src:_transformed+".webm", type:"video/webm"} |
|
65 ]; |
|
66 console.log("_transformed = " + srcTypeArray[0]["src"]); |
|
67 return srcTypeArray; |
|
68 } |
|
69 |
|
70 |
|
71 IriSP.libFiles.defaultDir = "../libs/"; |
|
72 IriSP.widgetsDir = "../metadataplayer"; |
|
73 IriSP.language = 'fr'; |
|
74 var _metadata = { |
|
75 url: 'bab_files/mashup.json', |
|
76 // url: 'http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/cljson/id/b2754186-a0c9-11e0-b8bd-00145ea49a02?callback=?', |
|
77 // url: 'http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/cljson/id/5afd8bbe-9b75-11e1-9e5d-00145ea4a2be?callback=?', |
|
78 // url: 'http://localhost/pf/ldtplatform/ldt/mashupbytag/?tag=projection', |
|
79 // url: 'http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/mashupbytag/?tag=mashuptag&callback=?', |
|
80 // url: 'http://localhost/pf/ldtplatform/ldt/mashupbytag/?tag=mashuptag&in=240000&out=1860000', |
|
81 format: 'ldt' |
|
82 }; |
|
83 var _config = { |
|
84 width : 630, |
|
85 container : 'LdtPlayer', |
|
86 default_options: { |
|
87 metadata: _metadata |
|
88 }, |
|
89 css : '../metadataplayer/LdtPlayer-core.css', |
|
90 widgets: [ |
|
91 { |
|
92 type: "MashupPlayer", |
|
93 url_transform: url_transform_func |
|
94 }, |
|
95 { type: "Slider" }, |
|
96 { type: "Controller" }, |
|
97 { |
|
98 type: "Segments", |
|
99 annotation_type: false |
|
100 }, |
|
101 { |
|
102 type: "Annotation", |
|
103 annotation_type: false |
|
104 }, |
|
105 { |
|
106 type: "Tagger", |
|
107 api_endpoint: "../post-test.php", |
|
108 tags: ["actif","amour","bonheur","captif","charité","désir","dieu","doute","famille","idéal","internationale","passif","patrie","peur","politique","président","spleen","travail"] |
|
109 }, |
|
110 { |
|
111 type: "MediaList", |
|
112 container: "mediaList" |
|
113 }, |
|
114 { |
|
115 type: "AnnotationsList", |
|
116 container: "annotationList", |
|
117 //ajax_url: "http://ldt.iri.centrepompidou.fr/ldtplatform/api/ldt/segments/{{media}}/{{begin}}/{{end}}?callback=?", |
|
118 //ajax_granularity: 30000, |
|
119 //limit_count: 3 |
|
120 }, |
|
121 { type: "Mediafragment" } |
|
122 ] |
|
123 }; |
|
124 |
|
125 _myPlayer = new IriSP.Metadataplayer(_config); |
|
126 |
|
127 </script> |
|
128 </body> |
|
129 </html> |
|