134 |
134 |
135 Widgets are modules, visible or not, adding functionalities to the Metadataplayer. |
135 Widgets are modules, visible or not, adding functionalities to the Metadataplayer. |
136 |
136 |
137 Located in the *src/widgets* directory, they’re composed of a mandatory JavaScript file, *WidgetName.js* and an optional stylesheet, *WidgetName.css* |
137 Located in the *src/widgets* directory, they’re composed of a mandatory JavaScript file, *WidgetName.js* and an optional stylesheet, *WidgetName.css* |
138 |
138 |
139 ### Common video player Widget oOptions ### |
139 ### Common video player Widget options ### |
140 |
140 |
141 - **video**, video file URL. |
141 - **video**, video file URL. |
142 - **height**, video player height (width is defined in the main *config* of IriSP.Metadataplayer(*config*) ). |
142 - **height**, video player height (width is defined in the main *config* of IriSP.Metadataplayer(*config*) ). |
143 - **autostart**, as its name implies, *true* or *false*. |
143 - **autostart**, as its name implies, *true* or *false*. |
144 - **url\_transform**, function to transform the video url, if a transformation is needed before integration. |
144 - **url\_transform**, function to transform the video url, if a transformation is needed before integration. |
|
145 Ex: url\_transform: function(url) { return url + ".mp4"; } |
145 |
146 |
146 Here is the list of available video player widget with their options. No specific css used. |
147 Here is the list of available video player widget with their options. No specific css used. |
147 |
148 |
148 #### HtmlPlayer #### |
149 #### HtmlPlayer #### |
149 |
150 |
204 - **annotation\_type**: (default: "chapitrage"), see *Common widget options*. |
205 - **annotation\_type**: (default: "chapitrage"), see *Common widget options*. |
205 - **show\_top\_border**: (default: false), show top widget border (useful depending on whether it is used in combination with the *Arrow* widget) |
206 - **show\_top\_border**: (default: false), show top widget border (useful depending on whether it is used in combination with the *Arrow* widget) |
206 - **site\_name**: "Lignes de Temps", site name to display when users click on "Share on social networks". |
207 - **site\_name**: "Lignes de Temps", site name to display when users click on "Share on social networks". |
207 - Uses a CSS stylesheet: yes |
208 - Uses a CSS stylesheet: yes |
208 |
209 |
209 ### AnnotationsList ### |
210 #### AnnotationsList #### |
210 |
211 |
211 - **Role**: Show a list of annotations. |
212 - **Role**: Show a list of annotations. |
212 - **Options**: |
213 - **Options**: |
213 - **ajax\_url**: (default: false), specifies an API template when annotations have to be loaded from an external source. In the URL, {{media}} will be replaced by the media ID, {{begin}} by the start *timecode* in milliseconds, {{end}} by the end *timecode* in milliseconds. If set to *false*, displayed annotations will be the ones loaded from the default metadata source. On the *Lignes de Temps*, the URL of the segments API is http://ldt.iri.centrepompidou.fr/ldtplatform/api/ldt/segments/{{media}}/{{begin}}/{{end}}?callback=? |
214 - **ajax\_url**: (default: false), specifies an API template when annotations have to be loaded from an external source. In the URL, {{media}} will be replaced by the media ID, {{begin}} by the start *timecode* in milliseconds, {{end}} by the end *timecode* in milliseconds. If set to *false*, displayed annotations will be the ones loaded from the default metadata source. On the *Lignes de Temps*, the URL of the segments API is http://ldt.iri.centrepompidou.fr/ldtplatform/api/ldt/segments/{{media}}/{{begin}}/{{end}}?callback=? |
214 - **ajax\_granularity**: (default: 300000 ms = 5 minutes), specifies the timespan to be loaded from the segment API, around the current timecode. |
215 - **ajax\_granularity**: (default: 300000 ms = 5 minutes), specifies the timespan to be loaded from the segment API, around the current timecode. |
248 |
249 |
249 #### CreateAnnotation #### |
250 #### CreateAnnotation #### |
250 |
251 |
251 - **Role**: Displays a form to create a new annotation |
252 - **Role**: Displays a form to create a new annotation |
252 - **Options**: |
253 - **Options**: |
|
254 - **after\_send\_timeout**: (default: 0), add annotation request timeout. |
|
255 - **always\_visible**: (default: false), widget always visible or not. |
|
256 - **annotation\_type**: (default: "Contributions"), see *Common widget options*. |
|
257 - **api\_endpoint\_template**: API Endpoint URL, with {{id\}\} as a placeholder for project ID, e.g.: "http://ldt.iri.centrepompidou.fr/ldtplatform/api/ldt/annotations/{{id}}.json". |
|
258 - **api\_method**: (default: "POST"), HTTP method used to send annotations. |
|
259 - **api\_serializer**: (default: "ldt\_annotate"), serializer to use when sending annotations. |
|
260 - **close\_after\_send**: (default: false), closes the widget after adding annotation. |
|
261 - **close\_widget\_timeout**: (default: 0), duration in milliseconds before widget is closed after send. If value is set to 0, the widget stays open. |
|
262 - **creator\_avatar**: Creator profile thumbnail URL. |
|
263 - **creator\_name**: Default annotation creator name. |
|
264 - **max\_tags**: (default: 8), maximum number of tags to display. |
|
265 - **pause\_on\_write**: (default: true), pauses video when we start to write. |
|
266 - **polemics**: polemic buttons to display, as an array of objects, e.g.: [ { keyword: "++", background\_color: "#00a000", text\_color: "#ffffff" } ] |
253 - **show\_title\_field**: (default: true), shows or hides the annotation title field. |
267 - **show\_title\_field**: (default: true), shows or hides the annotation title field. |
254 - **creator\_name**: Default annotation creator name. |
268 - **show\_creator\_field**: (default: true), shows or hides the annotation author field. |
255 - **creator\_avatar**: Creator profile thumbnail URL. |
269 - **start\_visible**: (default: true), widget visible at start. |
|
270 - **tag\_prefix**: (default: "#"), as its name implies. |
256 - **tag\_titles**: (default: false), list of tags to display, as an array of strings: [ "#firstTag", "#secondTag" ] |
271 - **tag\_titles**: (default: false), list of tags to display, as an array of strings: [ "#firstTag", "#secondTag" ] |
257 - **tags**: (default: false), list of tags to display, as an array of objects: [ { id: "tag-001", title: "#firstTag" } ]. Overrides *tag\_titles*. If both options are set to *false*, the most frequent tags in the project will be displayed. |
272 - **tags**: (default: false), list of tags to display, as an array of objects: [ { id: "tag-001", title: "#firstTag" } ]. Overrides *tag\_titles*. If both options are set to *false*, the most frequent tags in the project will be displayed. |
258 - **max\_tags**: (default: 8), maximum number of tags to display. |
|
259 - **polemics**: polemic buttons to display, as an array of objects, e.g.: [ { keyword: "++", background\_color: "#00a000", text\_color: "#ffffff" } ] |
|
260 - **annotation\_type**: (default: "Contributions"), see *Common widget options*. |
|
261 - **api\_serializer**: (default: "ldt\_annotate"), serializer to use when sending annotations. |
|
262 - **api\_endpoint\_template**: API Endpoint URL, with {{id\}\} as a placeholder for project ID, e.g.: "http://ldt.iri.centrepompidou.fr/ldtplatform/api/ldt/annotations/{{id}}.json". |
|
263 - **api\_method**: (default: "PUT"), HTTP method used to send annotations. *Lignes de temps* platform uses PUT. |
|
264 - **close\_widget\_timeout**: (default: 0), duration in milliseconds before widget is closed after send. If value is set to 0, the widget stays open. |
|
265 - Uses a CSS stylesheet: yes |
273 - Uses a CSS stylesheet: yes |
266 |
274 |
267 #### HelloWorld #### |
275 #### HelloWorld #### |
268 |
276 |
269 - **Role**: Example widget demonstration the API capabilities |
277 - **Role**: Example widget demonstration the API capabilities |
270 - **Options**: |
278 - **Options**: |
271 - **text**: (default: "world"), text to display after "Hello, " |
279 - **text**: (default: "world"), text to display after "Hello, " |
272 - Uses a CSS stylesheet: yes |
280 - Uses a CSS stylesheet: yes |
273 |
281 |
274 #### Media #### |
282 #### MediaList #### |
275 |
283 |
276 - **Role**: Shows current media, as well as other medias in the project. Mostly used for mashups |
284 - **Role**: Shows current media, as well as other medias in the project. Mostly used for mashups |
277 - **Options**: |
285 - **Options**: |
278 - **default\_thumbnail**: thumbnail to display when a media doesn’t have one |
286 - **default\_thumbnail**: thumbnail to display when a media doesn’t have one |
279 - **media\_url\_template**: Specifies an URL template for when a media doesn’t include URL information, e.g.: "http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/front/player/{{media}}/" |
287 - **media\_url\_template**: Specifies an URL template for when a media doesn’t include URL information, e.g.: "http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/front/player/{{media}}/" |
283 |
291 |
284 - **Role**: Handles *Media fragments*-compliant URIs (W3C Recommandation): Changing the playing position changes the URL and vice-versa. |
292 - **Role**: Handles *Media fragments*-compliant URIs (W3C Recommandation): Changing the playing position changes the URL and vice-versa. |
285 - An URL ending with #id=*annotation ID* points to an annotation, one with #t=*time in seconds* to a precise position. |
293 - An URL ending with #id=*annotation ID* points to an annotation, one with #t=*time in seconds* to a precise position. |
286 - No options |
294 - No options |
287 - Uses a CSS stylesheet: no |
295 - Uses a CSS stylesheet: no |
|
296 |
|
297 #### MultiSegments #### |
|
298 |
|
299 - **Rôle**: Displays horizontaly all the media's *annotation\_type* as Segments. |
|
300 - **Options**: |
|
301 - **visible_by_default**: true by default or false, as its name implies. |
|
302 - Utilise un fichier CSS: non |
288 |
303 |
289 #### Polemic #### |
304 #### Polemic #### |
290 |
305 |
291 - **Role**: Shows the *polemical timeline*, i.e. tweets colored according to the polemical syntax. Depending on the number of tweets, two visualization modes exist: |
306 - **Role**: Shows the *polemical timeline*, i.e. tweets colored according to the polemical syntax. Depending on the number of tweets, two visualization modes exist: |
292 - Below the threshold (low volume mode), tweets are represented as individual squares. |
307 - Below the threshold (low volume mode), tweets are represented as individual squares. |