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