test/mashup/player-html.htm
changeset 961 e1baacb52075
parent 959 ee11ed1b739e
child 965 eadb7290c325
equal deleted inserted replaced
956:7c1d08cf6956 961:e1baacb52075
    70     
    70     
    71 IriSP.libFiles.defaultDir = "../libs/";
    71 IriSP.libFiles.defaultDir = "../libs/";
    72 IriSP.widgetsDir = "../metadataplayer";
    72 IriSP.widgetsDir = "../metadataplayer";
    73 IriSP.language = 'fr';
    73 IriSP.language = 'fr';
    74 var _metadata = {
    74 var _metadata = {
    75 //    url: 'bab_files/mashup.json',
    75     url: 'bab_files/mashup.json',
    76 //    url: 'http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/cljson/id/b2754186-a0c9-11e0-b8bd-00145ea49a02?callback=?',
    76 //    url: 'http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/cljson/id/b2754186-a0c9-11e0-b8bd-00145ea49a02?callback=?',
    77 //    url: 'http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/cljson/id/5afd8bbe-9b75-11e1-9e5d-00145ea4a2be?callback=?',
    77 //    url: 'http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/cljson/id/5afd8bbe-9b75-11e1-9e5d-00145ea4a2be?callback=?',
    78 //	  url: 'http://localhost/pf/ldtplatform/ldt/mashupbytag/?tag=projection',
    78 //	  url: 'http://localhost/pf/ldtplatform/ldt/mashupbytag/?tag=projection',
    79     url: 'http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/mashupbytag/?tag=mashuptag&callback=?',
    79 //    url: 'http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/mashupbytag/?tag=mashuptag&callback=?',
    80 //    url: 'http://localhost/pf/ldtplatform/ldt/mashupbytag/?tag=mashuptag&in=240000&out=1860000',
    80 //    url: 'http://localhost/pf/ldtplatform/ldt/mashupbytag/?tag=mashuptag&in=240000&out=1860000',
    81     format: 'ldt'
    81     format: 'ldt'
    82 };
    82 };
    83 var _canPlayMp4 = document.createElement('video').canPlayType('video/mp4');
       
    84 var _config = {
    83 var _config = {
    85     gui: {
    84     width : 630,
    86         width : 630,
    85     container : 'LdtPlayer',
    87         container : 'LdtPlayer',
    86     default_options: {
    88         default_options: {
    87         metadata: _metadata
    89             metadata: _metadata
    88     },
       
    89     css : '../metadataplayer/LdtPlayer-core.css',
       
    90     widgets: [
       
    91         {
       
    92             type: "MashupPlayer",
       
    93             url_transform: url_transform_func
    90         },
    94         },
    91         css : '../metadataplayer/LdtPlayer-core.css',
    95         { type: "Slider" },
    92         widgets: [
    96         { type: "Controller" },
    93             { type: "Slider" },
    97         {
    94             { type: "Controller" },
    98             type: "Segments",
    95             {
    99             annotation_type: false
    96                 type: "Segments",
   100         },
    97                 annotation_type: false
   101         { type: "Arrow" },
    98             },
   102         {
    99             { type: "Arrow" },
   103             type: "Annotation",
   100             {
   104             annotation_type: false
   101                 type: "Annotation",
   105         },
   102                 annotation_type: false
   106         {
   103             },
   107             type: "Tagger",
   104             {
   108             api_endpoint: "../post-test.php",
   105                 type: "Tagger",
   109             tags: ["actif","amour","bonheur","captif","charité","désir","dieu","doute","famille","idéal","internationale","passif","patrie","peur","politique","président","spleen","travail"]
   106                 api_endpoint: "../post-test.php",
   110         },
   107                 tags: ["actif","amour","bonheur","captif","charité","désir","dieu","doute","famille","idéal","internationale","passif","patrie","peur","politique","président","spleen","travail"]
   111         {
   108             },
   112             type: "MediaList",
   109             {
   113             container: "mediaList"
   110                 type: "MediaList",
   114         },
   111                 container: "mediaList"
   115         {
   112             },
   116             type: "AnnotationsList",
   113             {
   117             container: "annotationList",
   114                 type: "AnnotationsList",
   118             //ajax_url: "http://ldt.iri.centrepompidou.fr/ldtplatform/api/ldt/segments/{{media}}/{{begin}}/{{end}}?callback=?",
   115                 container: "annotationList",
   119             //ajax_granularity: 30000,
   116                 //ajax_url: "http://ldt.iri.centrepompidou.fr/ldtplatform/api/ldt/segments/{{media}}/{{begin}}/{{end}}?callback=?",
   120             //limit_count: 3
   117                 //ajax_granularity: 30000,
   121         },
   118                 //limit_count: 3
   122         { type: "Mediafragment" }
   119             },
   123     ]
   120             { type: "Mediafragment" }
       
   121         ]
       
   122     },
       
   123     player:{
       
   124         type:'mashup-html',
       
   125         url_transform: url_transform_func,
       
   126         height: 350,
       
   127         width: 630,
       
   128         metadata: _metadata
       
   129     }
       
   130 };
   124 };
   131 
   125 
   132 _myPlayer = new IriSP.Metadataplayer(_config);
   126 _myPlayer = new IriSP.Metadataplayer(_config);
   133 
   127 
   134     </script>
   128     </script>