106 <?php endif;?> |
106 <?php endif;?> |
107 var _protocol_level = _protocol_level, |
107 var _protocol_level = _protocol_level, |
108 _cookiematches = document.cookie.match(/PHPSESSID=([A-Za-z0-9]+)/), |
108 _cookiematches = document.cookie.match(/PHPSESSID=([A-Za-z0-9]+)/), |
109 _cookie = (_cookiematches && _cookiematches.length > 1 ? _cookiematches[1] : undefined); |
109 _cookie = (_cookiematches && _cookiematches.length > 1 ? _cookiematches[1] : undefined); |
110 |
110 |
|
111 <?php if ($use_protocol): ?> |
111 var _tracer = tracemanager.init_trace("test", { |
112 var _tracer = tracemanager.init_trace("test", { |
112 url: "http://traces.advene.org:5000/", |
113 url: "http://traces.advene.org:5000/", |
113 requestmode: "GET", |
114 requestmode: "GET", |
114 syncmode: "sync", |
115 syncmode: "sync", |
115 default_subject: "PolemicTweet" |
116 default_subject: "PolemicTweet" |
117 _tracer.trace("Pt_LoadPage", { |
118 _tracer.trace("Pt_LoadPage", { |
118 url: document.location.href, |
119 url: document.location.href, |
119 protocol_level: <?php echo $protocol_level; ?>, |
120 protocol_level: <?php echo $protocol_level; ?>, |
120 cookie: _cookie |
121 cookie: _cookie |
121 }); |
122 }); |
|
123 <?php endif; ?> |
122 |
124 |
123 IriSP.libFiles.defaultDir = "<?php echo(registry_url('libdir','js'));?>"; |
125 IriSP.libFiles.defaultDir = "<?php echo(registry_url('libdir','js'));?>"; |
124 IriSP.widgetsDir = "<?php echo(registry_url('ldtwidgets','js'));?>"; |
126 IriSP.widgetsDir = "<?php echo(registry_url('ldtwidgets','js'));?>"; |
125 IriSP.libFiles.locations.jwPlayerSWF = "<?php echo(URL_ROOT); ?>res/mediaplayer/player.swf"; |
127 IriSP.libFiles.locations.jwPlayerSWF = "<?php echo(URL_ROOT); ?>res/mediaplayer/player.swf"; |
126 IriSP.language = "<?php echo($actual) ?>"; |
128 IriSP.language = "<?php echo($actual) ?>"; |
127 |
129 |
128 var _metadata = { |
130 var _metadata = { |
129 url: metadatas[metadata_key].url + '?callback=?', |
131 url: metadatas[metadata_key].url + '?callback=?', |
130 format: 'ldt' |
132 format: 'ldt' |
131 }; |
133 }; |
132 var _config = { |
134 var _config = { |
133 gui: { |
135 width: 600, |
134 width: 600, |
136 height: 800, |
135 height: 800, |
137 container: 'LdtPlayer', |
136 container: 'LdtPlayer', |
138 default_options: { |
137 default_options: { |
139 metadata: _metadata |
138 metadata: _metadata |
140 }, |
139 }, |
141 css:'<?php echo(registry_url('metadataplayer','css'));?>', |
140 css:'<?php echo(registry_url('metadataplayer','css'));?>', |
142 widgets: [ |
141 widgets: [ |
143 { |
|
144 type: "JwpPlayer", |
|
145 live: true, |
|
146 height: 360, |
|
147 width: 600, |
|
148 provider: "rtmp", |
|
149 autostart: true |
|
150 }, |
142 <?php if ($protocol_level > 1): ?> |
151 <?php if ($protocol_level > 1): ?> |
143 { |
152 { |
144 type: "Polemic" |
153 type: "Polemic" |
145 <?php if ($protocol_level < 3): ?> |
154 <?php if ($protocol_level < 3): ?> |
146 , |
155 , |
147 polemics: [] |
156 polemics: [] |
148 <?php endif; ?> |
157 <?php endif; ?> |
|
158 }, |
|
159 <?php endif; ?> |
|
160 { type: "Slider" }, |
|
161 { |
|
162 type: "Controller", |
|
163 disable_annotate_btn: true |
|
164 }, |
|
165 <?php if ($protocol_level > 1): ?> |
|
166 { |
|
167 type: "Segments", |
|
168 annotation_type: [ "chap", "découpage" ] |
|
169 }, |
|
170 { |
|
171 type: "Annotation", |
|
172 annotation_type: [ "chap", "découpage" ] |
|
173 }, |
|
174 { type: "Tweet" }, |
|
175 <?php if (!$use_protocol): ?> |
|
176 { |
|
177 type: "Tagcloud", |
|
178 container: "TagcloudContainer", |
|
179 exclude_pattern: /^@/, |
|
180 custom_stopwords: <?php echo json_encode(array($config['hashtag'])) ?> |
|
181 }, |
|
182 { |
|
183 type: "AnnotationsList", |
|
184 //ajax_url : "http://ldt.iri.centrepompidou.fr/ldtplatform/api/ldt/segments/{{media}}/{{begin}}/{{end}}?callback=?", |
|
185 //foreign_url : "http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/front/player/{{media}}/{{project}}/{{annotationType}}#id={{annotation}}", |
|
186 container: "AnnotationsListContainer" |
|
187 }, |
|
188 <?php endif; ?> |
|
189 <?php endif; ?> |
|
190 { type: "Mediafragment"}, |
|
191 <?php if ($use_protocol): ?> |
|
192 { |
|
193 type: "Trace", |
|
194 tracer: _tracer, |
|
195 extend: { |
|
196 cookie: _cookie, |
|
197 protocol_level: _protocol_level |
149 }, |
198 }, |
150 <?php endif; ?> |
199 js_console: true |
151 { type: "Slider" }, |
200 } |
152 { |
201 <?php endif; ?> |
153 type: "Controller", |
202 ] |
154 disable_annotate_btn: true |
|
155 }, |
|
156 <?php if ($protocol_level > 1): ?> |
|
157 { |
|
158 type: "Segments", |
|
159 annotation_type: [ "chap", "découpage" ] |
|
160 }, |
|
161 { type: "Arrow" }, |
|
162 { |
|
163 type: "Annotation", |
|
164 annotation_type: [ "chap", "découpage" ] |
|
165 }, |
|
166 { type: "Tweet" }, |
|
167 <?php if (!$use_protocol): ?> |
|
168 { |
|
169 type: "Tagcloud", |
|
170 container: "TagcloudContainer", |
|
171 exclude_pattern: /^@/, |
|
172 custom_stopwords: <?php echo json_encode(array($config['hashtag'])) ?> |
|
173 }, |
|
174 { |
|
175 type: "AnnotationsList", |
|
176 //ajax_url : "http://ldt.iri.centrepompidou.fr/ldtplatform/api/ldt/segments/{{media}}/{{begin}}/{{end}}?callback=?", |
|
177 //foreign_url : "http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/front/player/{{media}}/{{project}}/{{annotationType}}#id={{annotation}}", |
|
178 container: "AnnotationsListContainer" |
|
179 }, |
|
180 <?php endif; ?> |
|
181 <?php endif; ?> |
|
182 { type: "Mediafragment"}, |
|
183 <?php if ($use_protocol): ?> |
|
184 { |
|
185 type: "Trace", |
|
186 tracer: _tracer, |
|
187 extend: { |
|
188 cookie: _cookie, |
|
189 protocol_level: _protocol_level |
|
190 }, |
|
191 js_console: true |
|
192 } |
|
193 <?php endif; ?> |
|
194 ] |
|
195 }, |
|
196 player:{ |
|
197 type:'jwplayer', // player type |
|
198 live: true, |
|
199 height: 360, |
|
200 width: 600, |
|
201 provider: "rtmp", |
|
202 metadata: _metadata |
|
203 } |
|
204 }; |
203 }; |
205 |
|
206 |
204 |
207 jQuery(document).ready(function() { |
205 jQuery(document).ready(function() { |
208 |
206 |
209 <?php if ($show_splash): ?> |
207 <?php if ($show_splash): ?> |
210 var _fancybox = jQuery.fancybox; |
208 var _fancybox = jQuery.fancybox; |