test/videojs.html
changeset 1076 510fd2a482f4
parent 1073 687133dc13cf
equal deleted inserted replaced
1075:92cb33eb7a75 1076:510fd2a482f4
     1 <!DOCTYPE html>
     1 <!DOCTYPE html>
     2 <html>
     2 <html>
     3   <head>
     3   <head>
     4     <meta
     4     <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
     5     http-equiv="Content-type"
       
     6     content="text/html; charset=utf-8"
       
     7   >
       
     8     <title>Metadataplayer test with JwPlayer</title>
     5     <title>Metadataplayer test with JwPlayer</title>
     9     <!--        <link href='open-sans/css/fonts.css' rel='stylesheet' type='text/css'>
     6     <!--        <link href='open-sans/css/fonts.css' rel='stylesheet' type='text/css'>
    10 -->
     7 -->
    11     <link href='test.css' rel='stylesheet' type='text/css'>
     8     <link href="test.css" rel="stylesheet" type="text/css" />
    12     <link href="/src/main.module.css" rel="stylesheet" type="text/css">
     9     <link href="/src/main.module.css" rel="stylesheet" type="text/css" />
    13   </head>
    10   </head>
    14   <body>
    11   <body>
    15     <h1>Metadataplayer test with JwPlayer</h1>
    12     <h1>Metadataplayer test with JwPlayer</h1>
    16     <div id="LdtPlayer"></div>
    13     <div id="LdtPlayer"></div>
    17     <div id="AnnotationsListContainer"></div>
    14     <div id="AnnotationsListContainer"></div>
    18     <div id="SlideShareContainer"></div>
    15     <div id="SlideShareContainer"></div>
    19     <script type="module">
    16     <script type="module">
    20       import LdtPlayerCore from "/src/main.js";
    17       import LdtPlayerCore from "/src/main.js";
    21     IriSP.language = 'fr';
    18       IriSP.language = "fr";
    22     var _metadata = {
    19       var _metadata = {
    23 //        url: 'json/ldt-jwplayer.json',
    20         //        url: 'json/ldt-jwplayer.json',
    24           url: 'https://ldt.iri.centrepompidou.fr/ldtplatform/ldt/cljson/id/e2f36e5c-8b26-11e2-a28d-00145ea4a2be',
    21         url: "https://ldt.iri.centrepompidou.fr/ldtplatform/ldt/cljson/id/e2f36e5c-8b26-11e2-a28d-00145ea4a2be",
    25 //        url: 'http://capsicum/pf/ldtplatform/ldt/cljson/id/f1a17368-2bc8-11e1-b21a-00145ea49a02',
    22         //        url: 'http://capsicum/pf/ldtplatform/ldt/cljson/id/f1a17368-2bc8-11e1-b21a-00145ea49a02',
    26 //        url: 'http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/cljson/id/fc0a654e-49ea-11e2-b4ad-00145ea4a2be',
    23         //        url: 'http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/cljson/id/fc0a654e-49ea-11e2-b4ad-00145ea4a2be',
    27         format: 'ldt'
    24         format: "ldt",
    28     };
    25       };
    29     var _config = {
    26       var _config = {
    30         width : 550,
    27         width: 550,
    31         container : 'LdtPlayer',
    28         container: "LdtPlayer",
    32         default_options: {
    29         default_options: {
    33             metadata: _metadata
    30           metadata: _metadata,
    34         },
    31         },
    35         widgets: [
    32         widgets: [
    36             {
    33           {
    37                 type: "VideojsPlayer",
    34             type: "VideojsPlayer",
    38                 autostart: true,
    35             autostart: true,
    39                 url_transform: function(url) {
    36             url_transform: function (url) {
    40                     return url.replace('/ddc_player/video/','/ddc_player/mp4:video/');
    37               return url.replace(
    41                 }
    38                 "/ddc_player/video/",
       
    39                 "/ddc_player/mp4:video/"
       
    40               );
    42             },
    41             },
    43             { type: "Slider" },
    42           },
    44             { type: "Controller" },
    43           { type: "Slider" },
    45             {
    44           { type: "Controller" },
    46                 type: "Polemic",
    45           {
    47                 max_elements: 20,
    46             type: "Polemic",
    48                 annotation_type: false
    47             max_elements: 20,
    49             },
    48             annotation_type: false,
    50             { type: "Sparkline" },
    49           },
    51             { type: "MultiSegments" },
    50           { type: "Sparkline" },
    52             {
    51           { type: "MultiSegments" },
    53                 type: "CreateAnnotation",
    52           {
    54                 api_endpoint_template: "post-test.php",
    53             type: "CreateAnnotation",
    55                 creator_name: "Metadataplayer",
    54             api_endpoint_template: "post-test.php",
    56                 creator_avatar: "https://pbs.twimg.com/profile_images/2284174872/7df3h38zabcvjylnyfe3_normal.png",
    55             creator_name: "Metadataplayer",
    57                 tag_titles: ["amateur", "digital-humanities"],
    56             creator_avatar: "https://via.placeholder.com/48",
    58                 //show_title_field: false,
    57             tag_titles: ["amateur", "digital-humanities"],
    59                 //show_creator_field: false,
    58             //show_title_field: false,
    60                 show_slice: false
    59             //show_creator_field: false,
    61             },
    60             show_slice: false,
    62             {
    61           },
    63                 type: "Tweet"
    62           {
    64             },
    63             type: "Tweet",
    65             {
    64           },
    66                 type: "Tagcloud"
    65           {
    67             },
    66             type: "Tagcloud",
    68             {
    67           },
    69                 type: "AnnotationsList",
    68           {
    70                 container: "AnnotationsListContainer",
    69             type: "AnnotationsList",
    71                 default_thumbnail : "https://ldt.iri.centrepompidou.fr/static/site/ldt/css/imgs/video_sequence.png",
    70             container: "AnnotationsListContainer",
    72                 //ajax_url: "/pf/ldtplatform/api/ldt/1.0/segments/bytimecode/{{media}}/{{begin}}/{{end}}",
    71             default_thumbnail:
    73                 //ajax_granularity : 300000
    72               "https://ldt.iri.centrepompidou.fr/static/site/ldt/css/imgs/video_sequence.png",
    74             },
    73             //ajax_url: "/pf/ldtplatform/api/ldt/1.0/segments/bytimecode/{{media}}/{{begin}}/{{end}}",
    75             // {
    74             //ajax_granularity : 300000
    76             //     type: "Slideshare",
    75           },
    77             //     container: "SlideShareContainer"
    76           // {
    78             // },
    77           //     type: "Slideshare",
    79             { type: "Mediafragment"},
    78           //     container: "SlideShareContainer"
    80 //            { type: "Trace",
    79           // },
    81 //            js_console: true }
    80           { type: "Mediafragment" },
    82         ]
    81           //            { type: "Trace",
    83     };
    82           //            js_console: true }
    84     
    83         ],
    85     var _myPlayer = new IriSP.Metadataplayer(_config);
    84       };
       
    85 
       
    86       var _myPlayer = new IriSP.Metadataplayer(_config);
    86     </script>
    87     </script>
    87   </body>
    88   </body>
    88 </html>
    89 </html>