21 var _metadata = { |
21 var _metadata = { |
22 url: 'json/ldt-jwplayer.json', |
22 url: 'json/ldt-jwplayer.json', |
23 // url: 'http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/cljson/id/5a893570-ca73-11e1-9443-00145ea4a2be?callback=?', |
23 // url: 'http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/cljson/id/5a893570-ca73-11e1-9443-00145ea4a2be?callback=?', |
24 format: 'ldt' |
24 format: 'ldt' |
25 }; |
25 }; |
26 var _config = { |
26 var _config = { |
27 gui: { |
27 width : 550, |
28 width : 550, |
28 container : 'LdtPlayer', |
29 container : 'LdtPlayer', |
29 default_options: { |
30 default_options: { |
30 metadata: _metadata |
31 metadata: _metadata |
|
32 }, |
|
33 css : 'metadataplayer/LdtPlayer-core.css', |
|
34 widgets: [ |
|
35 { type: "Slider" }, |
|
36 { type: "Controller" }, |
|
37 { type: "Polemic" }, |
|
38 { type: "Segments" }, |
|
39 { type: "Slice" }, |
|
40 { |
|
41 type: "Arrow", |
|
42 base_height: 4 |
|
43 }, |
|
44 { type: "Annotation" }, |
|
45 { |
|
46 type: "CreateAnnotation", |
|
47 api_endpoint_template: "post-test.php", |
|
48 creator_name: "Metadataplayer", |
|
49 creator_avatar: "https://si0.twimg.com/sticky/default_profile_images/default_profile_1_normal.png", |
|
50 tag_titles: ["#amateur", "#digital-humanities"] |
|
51 }, |
|
52 { type: "Tweet" }, |
|
53 { |
|
54 type: "Tagger", |
|
55 api_endpoint: "post-test.php" |
|
56 }, |
|
57 { |
|
58 type: "Tagcloud" |
|
59 }, |
|
60 { |
|
61 type: "AnnotationsList", |
|
62 container: "AnnotationsListContainer", |
|
63 default_thumbnail : "http://ldt.iri.centrepompidou.fr/static/site/ldt/css/imgs/video_sequence.png" |
|
64 }, |
|
65 { type: "Mediafragment"} |
|
66 ] |
|
67 }, |
31 }, |
68 player:{ |
32 css : 'metadataplayer/LdtPlayer-core.css', |
69 type:'auto', |
33 widgets: [ |
70 live: true, |
34 { |
71 height: 350, |
35 type: "AutoPlayer", |
72 width: 550, |
36 live: true, |
73 provider: "rtmp", |
37 width: 550, |
74 streamer: function(_url) { |
38 provider: "rtmp", |
75 var _matches = _url.match(/^[^\/]+\/\/[^\/]+\/[^\/]+\//); |
39 autostart: true, |
76 if (_matches) { |
40 streamer: function(_url) { |
77 return _matches[0]; |
41 var _matches = _url.match(/^[^\/]+\/\/[^\/]+\/[^\/]+\//); |
78 } else { |
42 if (_matches) { |
79 return _url; |
43 return _matches[0]; |
|
44 } else { |
|
45 return _url; |
|
46 } |
80 } |
47 } |
81 }, |
48 }, |
82 //autostart: true, |
49 { type: "Slider" }, |
83 metadata: _metadata |
50 { type: "Controller" }, |
84 } |
51 { type: "Polemic" }, |
|
52 { type: "Segments" }, |
|
53 { type: "Slice" }, |
|
54 { |
|
55 type: "Arrow", |
|
56 base_height: 4 |
|
57 }, |
|
58 { type: "Annotation" }, |
|
59 { |
|
60 type: "CreateAnnotation", |
|
61 api_endpoint_template: "post-test.php", |
|
62 creator_name: "Metadataplayer", |
|
63 creator_avatar: "https://si0.twimg.com/sticky/default_profile_images/default_profile_1_normal.png", |
|
64 tag_titles: ["#amateur", "#digital-humanities"] |
|
65 }, |
|
66 { type: "Tweet" }, |
|
67 { |
|
68 type: "Tagger", |
|
69 api_endpoint: "post-test.php" |
|
70 }, |
|
71 { |
|
72 type: "Tagcloud" |
|
73 }, |
|
74 { |
|
75 type: "AnnotationsList", |
|
76 container: "AnnotationsListContainer", |
|
77 default_thumbnail : "http://ldt.iri.centrepompidou.fr/static/site/ldt/css/imgs/video_sequence.png" |
|
78 }, |
|
79 { type: "Mediafragment"} |
|
80 ] |
85 }; |
81 }; |
86 |
82 |
87 var _myPlayer = new IriSP.Metadataplayer(_config); |
83 var _myPlayer = new IriSP.Metadataplayer(_config); |
88 |
84 |
89 </script> |
85 </script> |