test/jwplayer.htm
branchplayers-as-widgets
changeset 958 2aa7fdb0762a
parent 945 7d9f6fd6f904
child 959 ee11ed1b739e
equal deleted inserted replaced
957:4da0a5740b6c 958:2aa7fdb0762a
    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 //        url: 'http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/cljson/id/5a893570-ca73-11e1-9443-00145ea4a2be?callback=?',
    24         format: 'ldt'
    24         format: 'ldt'
    25     };
    25     };
    26     var _config = {            
    26     var _config = {
    27         gui: {
    27         width : 550,
    28             width : 550,
    28         container : 'LdtPlayer',
    29             container : 'LdtPlayer',
    29         default_options: {
    30             default_options: {
    30             metadata: _metadata
       
    31         },
       
    32         css : 'metadataplayer/LdtPlayer-core.css',
       
    33         widgets: [
       
    34             {
       
    35                 type: "JwpPlayer",
       
    36                 live: true, 
       
    37                 height: 350, 
       
    38                 width: 550, 
       
    39                 provider: "rtmp",
       
    40                 streamer: function(_url) {
       
    41                     var _matches = _url.match(/^[^\/]+\/\/[^\/]+\/[^\/]+\//);
       
    42                     if (_matches) {
       
    43                         return _matches[0];
       
    44                     } else {
       
    45                         return _url;
       
    46                     }
       
    47                 },
    31                 metadata: _metadata
    48                 metadata: _metadata
    32             },
    49             },
    33             css : 'metadataplayer/LdtPlayer-core.css',
    50             { type: "Slider" },
    34             widgets: [
    51             { type: "Controller" },
    35                 { type: "Slider" },
    52             { type: "Polemic" },
    36                 { type: "Controller" },
    53             { type: "Segments" },
    37                 { type: "Polemic" },
    54             { type: "Slice" },
    38                 { type: "Segments" },
    55             {
    39                 { type: "Slice" },
    56                 type: "Arrow",
    40                 {
    57                 base_height: 4
    41                     type: "Arrow",
       
    42                     base_height: 4
       
    43                 },
       
    44                 { type: "Annotation" },
       
    45                 {
       
    46                     type: "CreateAnnotation",
       
    47                     api_endpoint_template: "post-test.php",
       
    48                     creator_name: "Metadataplayer",
       
    49                     creator_avatar: "https://si0.twimg.com/sticky/default_profile_images/default_profile_1_normal.png",
       
    50                     tag_titles: ["#amateur", "#digital-humanities"]
       
    51                 },
       
    52                 { type: "Tweet" },
       
    53                 {
       
    54                     type: "Tagger",
       
    55                     api_endpoint: "post-test.php"
       
    56                 },
       
    57                 {
       
    58                     type: "Tagcloud"
       
    59                 },
       
    60                 {
       
    61                     type: "AnnotationsList",
       
    62                     container: "AnnotationsListContainer",
       
    63                     default_thumbnail : "http://ldt.iri.centrepompidou.fr/static/site/ldt/css/imgs/video_sequence.png"
       
    64                 },
       
    65                 { type: "Mediafragment"}
       
    66             ]
       
    67         },
       
    68         player:{
       
    69             type:'auto',
       
    70             live: true, 
       
    71             height: 350, 
       
    72             width: 550, 
       
    73             provider: "rtmp",
       
    74             streamer: function(_url) {
       
    75                 var _matches = _url.match(/^[^\/]+\/\/[^\/]+\/[^\/]+\//);
       
    76                 if (_matches) {
       
    77                     return _matches[0];
       
    78                 } else {
       
    79                     return _url;
       
    80                 }
       
    81             },
    58             },
    82             //autostart: true,
    59             { type: "Annotation" },
    83             metadata: _metadata
    60             {
    84         }
    61                 type: "CreateAnnotation",
       
    62                 api_endpoint_template: "post-test.php",
       
    63                 creator_name: "Metadataplayer",
       
    64                 creator_avatar: "https://si0.twimg.com/sticky/default_profile_images/default_profile_1_normal.png",
       
    65                 tag_titles: ["#amateur", "#digital-humanities"]
       
    66             },
       
    67             { type: "Tweet" },
       
    68             {
       
    69                 type: "Tagger",
       
    70                 api_endpoint: "post-test.php"
       
    71             },
       
    72             {
       
    73                 type: "Tagcloud"
       
    74             },
       
    75             {
       
    76                 type: "AnnotationsList",
       
    77                 container: "AnnotationsListContainer",
       
    78                 default_thumbnail : "http://ldt.iri.centrepompidou.fr/static/site/ldt/css/imgs/video_sequence.png"
       
    79             },
       
    80             { type: "Mediafragment"}
       
    81         ]
    85     };
    82     };
    86     
    83     
    87     var _myPlayer = new IriSP.Metadataplayer(_config);
    84     var _myPlayer = new IriSP.Metadataplayer(_config);
    88     
    85     
    89         </script>
    86         </script>