metadataplayer/jwplayer.htm
changeset 15 ed7ac7e94090
parent 5 e27a08b0a037
equal deleted inserted replaced
14:94e058cf84de 15:ed7ac7e94090
    13     <body>
    13     <body>
    14         <h1>Metadataplayer test with JwPlayer</h1>
    14         <h1>Metadataplayer test with JwPlayer</h1>
    15         <div id="LdtPlayer"></div>
    15         <div id="LdtPlayer"></div>
    16         <div id="AnnotationsListContainer"></div>
    16         <div id="AnnotationsListContainer"></div>
    17         <script type="text/javascript">
    17         <script type="text/javascript">
    18     IriSP.libFiles.locations.jwPlayerSWF = "player.swf";
       
    19     IriSP.libFiles.defaultDir = "libs/";
    18     IriSP.libFiles.defaultDir = "libs/";
       
    19     IriSP.language = 'fr';
    20     IriSP.widgetsDir = "metadataplayer";
    20     IriSP.widgetsDir = "metadataplayer";
    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         format: 'ldt'
    24         format: 'ldt'
    24     };
    25     };
    25     var _config = {            
    26     var _config = {
    26         gui: {
    27         width : 550,
    27             width : 620,
    28         container : 'LdtPlayer',
    28             container : 'LdtPlayer',
    29         default_options: {
    29             default_options: {
    30             metadata: _metadata
    30                 metadata: _metadata
    31         },
       
    32         css : 'metadataplayer/LdtPlayer-core.css',
       
    33         widgets: [
       
    34             {
       
    35                 type: "AutoPlayer",
       
    36                 live: true,
       
    37                 width: 550, 
       
    38                 provider: "rtmp",
       
    39                 autostart: true,
       
    40                 streamer: function(_url) {
       
    41                     var _matches = _url.match(/^[^\/]+\/\/[^\/]+\/[^\/]+\//);
       
    42                     if (_matches) {
       
    43                         return _matches[0];
       
    44                     } else {
       
    45                         return _url;
       
    46                     }
       
    47                 }
    31             },
    48             },
    32             css : 'metadataplayer/LdtPlayer-core.css',
    49             { type: "Slider" },
    33             widgets: [
    50             { type: "Controller" },
    34                 { type: "Sparkline" },
    51             { type: "Polemic" },
    35                 { type: "Slider" },
    52             { type: "Segments" },
    36                 { type: "Controller" },
    53             { type: "Annotation" },
    37                 { type: "Polemic" },
    54             {
    38                 { type: "Segments" },
    55                 type: "CreateAnnotation",
    39                 { type: "Slice" },
    56                 api_endpoint_template: "post-test.php",
    40                 { type: "Arrow" },
    57                 creator_name: "Metadataplayer",
    41                 { type: "Annotation" },
    58                 creator_avatar: "https://si0.twimg.com/sticky/default_profile_images/default_profile_1_normal.png",
    42                 {
    59                 tag_titles: ["#amateur", "#digital-humanities"]
    43                     type: "Tagger",
    60             },
    44                     api_endpoint: "post-test.php",
    61             { type: "Tweet" },
    45                 },
    62             {
    46                 { type: "Tweet" },
    63                 type: "Tagger",
    47                 {
    64                 api_endpoint: "post-test.php"
    48                     type: "Tagcloud",
    65             },
    49                     segment_annotation_type: "chap"
    66             {
    50                 },
    67                 type: "Tagcloud"
    51                 {
    68             },
    52                     type: "AnnotationsList",
    69             {
    53                     container: "AnnotationsListContainer"
    70                 type: "AnnotationsList",
    54                 },
    71                 container: "AnnotationsListContainer",
    55                 { type: "Mediafragment"}
    72                 default_thumbnail : "http://ldt.iri.centrepompidou.fr/static/site/ldt/css/imgs/video_sequence.png",
    56             ]
    73                 //ajax_url: "/pf/ldtplatform/api/ldt/segments/{{media}}/{{begin}}/{{end}}",
    57         },
    74                 //ajax_granularity : 300000
    58         player:{
    75             },
    59             type:'auto',
    76             { type: "Mediafragment"}
    60             live: true, 
    77         ]
    61             height: 350, 
       
    62             width: 620, 
       
    63             provider: "rtmp",
       
    64             autostart: true,
       
    65             metadata: _metadata
       
    66         }
       
    67     };
    78     };
    68     
    79     
    69     _myPlayer = new IriSP.Metadataplayer(_config);
    80     var _myPlayer = new IriSP.Metadataplayer(_config);
    70     
    81     
    71         </script>
    82         </script>
    72     </body>
    83     </body>
    73 </html>
    84 </html>