|
1 {% spaceless %} |
|
2 {% load i18n %} |
|
3 {% load thumbnail %} |
|
4 <div> |
|
5 <div id="{{ player_id }}_embed" class="iri_player_embed"> |
|
6 </div> |
|
7 <script type="text/javascript" src="{{WEB_URL}}{{LDT_MEDIA_PREFIX}}metadataplayer/LdtPlayer-core.js"></script> |
|
8 <script type="text/javascript"> |
|
9 |
|
10 IriSP.libFiles.defaultDir = "{{WEB_URL}}{{LDT_MEDIA_PREFIX}}js/"; |
|
11 IriSP.libFiles.locations.jwPlayerSWF = "{{WEB_URL}}{{LDT_MEDIA_PREFIX}}swf/player.swf"; |
|
12 IriSP.libFiles.locations.zeroClipboardSwf = "{{WEB_URL}}{{LDT_MEDIA_PREFIX}}swf/ZeroClipboard10.swf"; |
|
13 IriSP.libFiles.locations.cssjQueryUI = "{{WEB_URL}}{{LDT_MEDIA_PREFIX}}css/jq-css/themes/base/jquery-ui.css" |
|
14 IriSP.language = '{{LANGUAGE_CODE}}'; |
|
15 |
|
16 IriSP.widgetsDir = "{{WEB_URL}}{{LDT_MEDIA_PREFIX}}metadataplayer"; |
|
17 var _metadata = { |
|
18 url: '{{ json_url }}', |
|
19 format: 'ldt' |
|
20 }; |
|
21 var _config = { |
|
22 width: '{{ player_width }}', |
|
23 container: '{{ player_id }}_embed', |
|
24 css: '{{WEB_URL}}{{LDT_MEDIA_PREFIX}}metadataplayer/LdtPlayer-core.css', |
|
25 default_options: { |
|
26 metadata: _metadata |
|
27 }, |
|
28 widgets: [ |
|
29 { |
|
30 {% if external_url %} |
|
31 type: "AutoPlayer", |
|
32 video: "{{ external_url }}", |
|
33 {% else %} |
|
34 type: "JwpPlayer", |
|
35 live: true, |
|
36 {% endif %} |
|
37 height: 300, |
|
38 autostart: true |
|
39 }, |
|
40 { |
|
41 type: "Polemic" |
|
42 },{ |
|
43 type: "Sparkline" |
|
44 },{ |
|
45 type: "Slider" |
|
46 },{ |
|
47 type: "AnnotationsList", |
|
48 container: "AnnotationsList_ext", |
|
49 ajax_url: "{% url segment_api_empty %}{% templatetag openvariable %}media{% templatetag closevariable %}/{% templatetag openvariable %}begin{% templatetag closevariable %}/{% templatetag openvariable %}end{% templatetag closevariable %}", |
|
50 ajax_granularity : 300000, |
|
51 default_thumbnail : "{{WEB_URL}}{{LDT_MEDIA_PREFIX}}css/imgs/video_sequence.png" |
|
52 },{ |
|
53 type: "Controller" |
|
54 },{ |
|
55 type: "Segments", |
|
56 annotation_type: ["chap","découpage"] |
|
57 },{ |
|
58 type: "Slice", |
|
59 start_visible : false, |
|
60 live_update : true |
|
61 },{ |
|
62 type: "Arrow", |
|
63 base_height: 3 |
|
64 },{ |
|
65 type: "Annotation", |
|
66 start_minimized: true, |
|
67 site_name : "Lignes de Temps", |
|
68 annotation_type: ["chap","découpage"] |
|
69 },{ |
|
70 type: "Tweet", |
|
71 hide_timeout: 5000 |
|
72 },{ |
|
73 type: "CreateAnnotation", |
|
74 api_endpoint_template: "{% url annotation_api_empty %}{% templatetag openvariable %}id{% templatetag closevariable %}.json", |
|
75 api_method: "PUT", |
|
76 after_send_timeout: 8000, |
|
77 close_after_send: false, |
|
78 tag_titles: ["#amateur", "#digital-humanities"], |
|
79 creator_name: '{{request.user.username}}', |
|
80 creator_avatar: '{% thumbnail request.user.get_profile.image "48x48" format="PNG" crop="center" as im %}{{WEB_URL}}{{ im.url }}{% endthumbnail %}' || "https://si0.twimg.com/sticky/default_profile_images/default_profile_1_normal.png" |
|
81 },{ |
|
82 type: "Slideshare", |
|
83 container: "Slideshare_ext", |
|
84 embed_width: 400, |
|
85 embed_height: 334, |
|
86 annotation_type: "slide" |
|
87 },{ |
|
88 type: "Mediafragment" |
|
89 },{ |
|
90 type: "Social", |
|
91 container: "Social_ext", |
|
92 url: document.location.href.replace(/#.*$/,""), |
|
93 text: document.title |
|
94 } |
|
95 ] |
|
96 }; |
|
97 |
|
98 _myPlayer = new IriSP.Metadataplayer(_config); |
|
99 </script> |
|
100 </div> |
|
101 {% endspaceless %} |