169 <?php endforeach; ?> |
169 <?php endforeach; ?> |
170 ]} |
170 ]} |
171 <?php endif; ?> |
171 <?php endif; ?> |
172 }, |
172 }, |
173 <?php endif; ?> |
173 <?php endif; ?> |
|
174 <?php if ($protocol_level > 1): ?> |
|
175 { |
|
176 type: "Polemic", |
|
177 max_elements: 60, |
|
178 default_version: "1", |
|
179 annotation_type: ["chat"], |
|
180 defaultcolor: "#9b8864", |
|
181 <?php if (isset($annotations)): ?> |
|
182 polemics : { "<?php echo($annotation_protocol_version)?>":[ |
|
183 <?php foreach ($annotations as $annot_key => $annot_def): ?> |
|
184 <?php |
|
185 $hVal = (isset($annot_def['colors'])&&isset($annot_def['colors']['h']))?floatval($annot_def['colors']['h']):0.17; |
|
186 $hVal = ($hVal<1)?floor($hVal*360.0):$hVal; |
|
187 $sVal = (isset($annot_def['colors'])&&isset($annot_def['colors']['s']))?floatval($annot_def['colors']['s']):1.0; |
|
188 |
|
189 $polemicColor = isset($annot_def['polemic_color'])?$annot_def['polemic_color']:rgb2hex(hsl2Rgb($hVal, $sVal, 0.5)); |
|
190 |
|
191 if($annot_key == 'default') { continue; } ?> |
|
192 { |
|
193 "name" : "<?php echo $annot_def['polemic_cat']; ?>", |
|
194 "keywords" : <?php echo json_encode($annot_def['polemic_keywords']); ?>, |
|
195 "color" : "<?php echo $polemicColor; ?>" |
|
196 }, |
|
197 <?php endforeach; ?> |
|
198 ]} |
|
199 <?php endif; ?> |
|
200 }, |
|
201 <?php endif; ?> |
174 <?php if ($protocol_level > 1 || isset($annotations)): ?> |
202 <?php if ($protocol_level > 1 || isset($annotations)): ?> |
175 { |
203 { |
176 type: "MultiSegments", |
204 type: "MultiSegments", |
177 //annotation_type: "chap" |
205 //annotation_type: "chap" |
178 }, |
206 }, |
191 type: "AnnotationsList", |
219 type: "AnnotationsList", |
192 //ajax_url : "<?php echo(LDT_PLATFORM); ?>ldtplatform/api/ldt/segments/{{media}}/{{begin}}/{{end}}?callback=?", |
220 //ajax_url : "<?php echo(LDT_PLATFORM); ?>ldtplatform/api/ldt/segments/{{media}}/{{begin}}/{{end}}?callback=?", |
193 //foreign_url : "<?php echo(LDT_PLATFORM); ?>ldtplatform/ldt/front/player/{{media}}/{{project}}/{{annotationType}}#id={{annotation}}", |
221 //foreign_url : "<?php echo(LDT_PLATFORM); ?>ldtplatform/ldt/front/player/{{media}}/{{project}}/{{annotationType}}#id={{annotation}}", |
194 container: "AnnotationsListContainer" |
222 container: "AnnotationsListContainer" |
195 }, |
223 }, |
196 { |
224 // { |
197 type: "CreateAnnotation", |
225 // type: "CreateAnnotation", |
198 api_endpoint_template: "<?php echo(LDT_PLATFORM); ?>ldtplatform/api/ldt/1.0/annotations/", |
226 // api_endpoint_template: "<?php echo(LDT_PLATFORM); ?>ldtplatform/api/ldt/1.0/annotations/", |
199 api_method: 'POST', |
227 // api_method: 'POST', |
200 after_send_timeout: 8000, |
228 // after_send_timeout: 8000, |
201 show_mic_record: false, |
229 // show_mic_record: false, |
202 close_after_send: false, |
230 // close_after_send: false, |
203 slice_annotation_type: ["chap","découpage"], |
231 // slice_annotation_type: ["chap","découpage"], |
204 creator_avatar: "<?php echo(URL_ROOT); ?>images/avatar.png" |
232 // creator_avatar: "<?php echo(URL_ROOT); ?>images/avatar.png" |
205 }, |
233 // }, |
206 <?php endif; ?> |
234 <?php endif; ?> |
207 { type: "Mediafragment"}, |
235 { type: "Mediafragment"}, |
208 ] |
236 ] |
209 }; |
237 }; |
210 |
238 |