test/videojs.html
changeset 1073 687133dc13cf
child 1076 510fd2a482f4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/videojs.html	Thu Oct 17 00:58:24 2024 +0200
@@ -0,0 +1,88 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta
+    http-equiv="Content-type"
+    content="text/html; charset=utf-8"
+  >
+    <title>Metadataplayer test with JwPlayer</title>
+    <!--        <link href='open-sans/css/fonts.css' rel='stylesheet' type='text/css'>
+-->
+    <link href='test.css' rel='stylesheet' type='text/css'>
+    <link href="/src/main.module.css" rel="stylesheet" type="text/css">
+  </head>
+  <body>
+    <h1>Metadataplayer test with JwPlayer</h1>
+    <div id="LdtPlayer"></div>
+    <div id="AnnotationsListContainer"></div>
+    <div id="SlideShareContainer"></div>
+    <script type="module">
+      import LdtPlayerCore from "/src/main.js";
+    IriSP.language = 'fr';
+    var _metadata = {
+//        url: 'json/ldt-jwplayer.json',
+          url: 'https://ldt.iri.centrepompidou.fr/ldtplatform/ldt/cljson/id/e2f36e5c-8b26-11e2-a28d-00145ea4a2be',
+//        url: 'http://capsicum/pf/ldtplatform/ldt/cljson/id/f1a17368-2bc8-11e1-b21a-00145ea49a02',
+//        url: 'http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/cljson/id/fc0a654e-49ea-11e2-b4ad-00145ea4a2be',
+        format: 'ldt'
+    };
+    var _config = {
+        width : 550,
+        container : 'LdtPlayer',
+        default_options: {
+            metadata: _metadata
+        },
+        widgets: [
+            {
+                type: "VideojsPlayer",
+                autostart: true,
+                url_transform: function(url) {
+                    return url.replace('/ddc_player/video/','/ddc_player/mp4:video/');
+                }
+            },
+            { type: "Slider" },
+            { type: "Controller" },
+            {
+                type: "Polemic",
+                max_elements: 20,
+                annotation_type: false
+            },
+            { type: "Sparkline" },
+            { type: "MultiSegments" },
+            {
+                type: "CreateAnnotation",
+                api_endpoint_template: "post-test.php",
+                creator_name: "Metadataplayer",
+                creator_avatar: "https://pbs.twimg.com/profile_images/2284174872/7df3h38zabcvjylnyfe3_normal.png",
+                tag_titles: ["amateur", "digital-humanities"],
+                //show_title_field: false,
+                //show_creator_field: false,
+                show_slice: false
+            },
+            {
+                type: "Tweet"
+            },
+            {
+                type: "Tagcloud"
+            },
+            {
+                type: "AnnotationsList",
+                container: "AnnotationsListContainer",
+                default_thumbnail : "https://ldt.iri.centrepompidou.fr/static/site/ldt/css/imgs/video_sequence.png",
+                //ajax_url: "/pf/ldtplatform/api/ldt/1.0/segments/bytimecode/{{media}}/{{begin}}/{{end}}",
+                //ajax_granularity : 300000
+            },
+            // {
+            //     type: "Slideshare",
+            //     container: "SlideShareContainer"
+            // },
+            { type: "Mediafragment"},
+//            { type: "Trace",
+//            js_console: true }
+        ]
+    };
+    
+    var _myPlayer = new IriSP.Metadataplayer(_config);
+    </script>
+  </body>
+</html>
\ No newline at end of file