Added MediaList widget for mashup new-model
authorveltr
Mon, 14 May 2012 16:59:07 +0200
branchnew-model
changeset 902 14022f1d49ab
parent 900 7673d645a8e0
child 903 d9da52e20f7f
Added MediaList widget for mashup
assets/psd/tag.psd
src/js/model.js
src/js/serializers/PlatformSerializer.js
src/widgets/Annotation.css
src/widgets/Annotation.js
src/widgets/AnnotationsList.css
src/widgets/AnnotationsList.js
src/widgets/MediaList.css
src/widgets/MediaList.js
src/widgets/Trace.js
src/widgets/img/tag.png
test/mashup/bab_files/mashup.json
test/mashup/player.htm
test/mashup/style.css
Binary file assets/psd/tag.psd has changed
--- a/src/js/model.js	Fri May 11 19:22:13 2012 +0200
+++ b/src/js/model.js	Mon May 14 16:59:07 2012 +0200
@@ -499,12 +499,12 @@
 
 /* */
 
-IriSP.Model.MashedAnnotation = function(_annotation, _offset) {
-    IriSP.Model.Element.call(this, IriSP.Model.getUID(), _annotation.source);
+IriSP.Model.MashedAnnotation = function(_mashup, _annotation) {
+    IriSP.Model.Element.call(this, _mashup.namespacedId.name + "_" + _annotation.namespacedId.name, _annotation.source);
     this.elementType = 'mashedAnnotation';
     this.annotation = _annotation;
-    this.begin = new IriSP.Model.Time(_offset);
-    this.end = new IriSP.Model.Time(_offset + _annotation.getDuration());
+    this.begin = new IriSP.Model.Time(_mashup.duration);
+    this.end = new IriSP.Model.Time(_mashup.duration + _annotation.getDuration());
     this.title = this.annotation.title;
     this.description = this.annotation.description;
     this.color = this.annotation.color;
@@ -541,7 +541,7 @@
 IriSP.Model.Mashup.prototype = new IriSP.Model.Element();
 
 IriSP.Model.Mashup.prototype.addSegment = function(_annotation) {
-    var _mashedAnnotation = new IriSP.Model.MashedAnnotation(_annotation, this.duration);
+    var _mashedAnnotation = new IriSP.Model.MashedAnnotation(this, _annotation);
     this.duration.setMilliseconds(_mashedAnnotation.end);
     this.segments.push(_mashedAnnotation);
     this.medias.push(_annotation.getMedia());
--- a/src/js/serializers/PlatformSerializer.js	Fri May 11 19:22:13 2012 +0200
+++ b/src/js/serializers/PlatformSerializer.js	Mon May 14 16:59:07 2012 +0200
@@ -128,13 +128,10 @@
             serialized_name : "mashups",
             model_name : "mashup",
             deserializer : function(_data, _source) {
-                console.log("Before");
                 var _res = new IriSP.Model.Mashup(_data.id, _source);
                 _res.title = _data.meta["dc:title"];
                 _res.description = _data.meta["dc:description"];
-                console.log(_data);
                 for (var _i = 0; _i < _data.segments.length; _i++) {
-                    console.log("Adding segment "+_data.segments[_i])
                     _res.addSegmentById(_data.segments[_i]);
                 }
                 return _res;        
--- a/src/widgets/Annotation.css	Fri May 11 19:22:13 2012 +0200
+++ b/src/widgets/Annotation.css	Mon May 14 16:59:07 2012 +0200
@@ -20,9 +20,14 @@
 .Ldt-Annotation-Inner h3 {
     margin: 5px 0;
     font-size: 14px;
+    font-weight: bold;
 }
 
-.Ldt-Annotation-Title {
+.Ldt-Annotation-Inner h3.Ldt-Annotation-MashupOrigin {
+    font-size: 12px;
+}
+
+.Ldt-Annotation-Title, .Ldt-Annotation-MashupMedia {
     color: #0068c4;
 }
 
@@ -74,16 +79,30 @@
     display: none;
 }
 
+span.Ldt-Annotation-TagTitle {
+    display: inline-block; margin: 5px 2px 0 0; font-size: 12px;
+}
+
 ul.Ldt-Annotation-Tags {
-    list-style: none; padding: 0; margin: 5px 0;
+    display: inline-block; list-style: none; padding: 0; margin: 5px 0;
 }
 
-.Ldt-Annotation-Tags li {
-    display: inline-block; margin: 0 3px 0 0; padding: 0;
+li.Ldt-Annotation-TagLabel {
+    display: inline-block; border: none; margin: 0 10px 5px 0; height: 23px; padding: 0 0 0 20px;
+    background: url(img/tag.png) left top no-repeat; font-weight: bold;
 }
 
-.Ldt-Annotation-TagLabel {
-    font-weight: bold;
+.Ldt-Annotation-TagLabel span {
+    display: inline-block; font-size: 12px; height: 19px; padding: 4px 5px 0 0; border: none; margin: 0;
+    background: url(img/tag.png) right top no-repeat;
+}
+
+.Ldt-Annotation-MashupOrigin {
+    display: none;
+}
+
+.Ldt-Annotation-isMashup .Ldt-Annotation-MashupOrigin {
+    display: block;
 }
 
 .Ldt-Annotation-Empty .Ldt-Annotation-HiddenWhenEmpty {
--- a/src/widgets/Annotation.js	Fri May 11 19:22:13 2012 +0200
+++ b/src/widgets/Annotation.js	Mon May 14 16:59:07 2012 +0200
@@ -12,13 +12,15 @@
         share_on: "Partager sur",
         watching: "Je regarde ",
         on_site: " sur ",
-        tags: "Mots-clés&nbsp;:"
+        tags: "Mots-clés&nbsp;:",
+        excerpt_from: "Extrait de&nbsp;:"
     },
     "en": {
         share_on: "Share on",
         watching: "I'm watching ",
         on_site: " on ",
-        tags: "Keywords:"
+        tags: "Keywords:",
+        excerpt_from: "Excerpt from:"
     }
 }
 
@@ -30,8 +32,10 @@
     + '<a href="#" target="_blank" class="Ldt-Annotation-Share Ldt-Annotation-Gplus" title="{{l10n.share_on}} Google+"></a>'
     + '</div><h3 class="Ldt-Annotation-HiddenWhenEmpty"><span class="Ldt-Annotation-Title"></span> <span class="Ldt-Annotation-Time">'
     + '( <span class="Ldt-Annotation-Begin"></span> - <span class="Ldt-Annotation-End"></span> )</span></h3>'
+    + '<h3 class="Ldt-Annotation-MashupOrigin Ldt-Annotation-HiddenWhenEmpty">{{l10n.excerpt_from}} <span class="Ldt-Annotation-MashupMedia"></span> <span class="Ldt-Annotation-Time">'
+    + '( <span class="Ldt-Annotation-MashupBegin"></span> - <span class="Ldt-Annotation-MashupEnd"></span> )</span></h3>'
     + '<p class="Ldt-Annotation-Description Ldt-Annotation-HiddenWhenMinimized Ldt-Annotation-HiddenWhenEmpty"></p>'
-    + '<div class="Ldt-Annotation-Tags-Block Ldt-Annotation-HiddenWhenMinimized Ldt-Annotation-HiddenWhenEmpty Ldt-Annotation-NoTags">{{l10n.tags}}<ul class="Ldt-Annotation-Tags"></ul></div></div></div>';
+    + '<div class="Ldt-Annotation-Tags-Block Ldt-Annotation-HiddenWhenMinimized Ldt-Annotation-HiddenWhenEmpty Ldt-Annotation-NoTags"><span class="Ldt-Annotation-TagTitle">{{l10n.tags}}</span><ul class="Ldt-Annotation-Tags"></ul></div></div></div>';
 
 IriSP.Widgets.Annotation.prototype.defaults = {
     annotation_type : "chap",
@@ -78,7 +82,7 @@
     var _tags = _annotation.getTagTexts();
     if (_tags.length) {
         var _html = IriSP._(_tags).map(function(_tag) {
-            return '<li class="Ldt-Annotation-TagLabel">' + _tag + '</li>';
+            return '<li class="Ldt-Annotation-TagLabel"><span>' + _tag + '</span></li>';
         }).join("");
         this.$.find(".Ldt-Annotation-Tags").html(_html);
         this.$.find(".Ldt-Annotation-Tags-Block").removeClass("Ldt-Annotation-NoTags");
@@ -89,6 +93,14 @@
     this.$.find(".Ldt-Annotation-Description").html(_annotation.description);
     this.$.find(".Ldt-Annotation-Begin").html(_annotation.begin.toString());
     this.$.find(".Ldt-Annotation-End").html(_annotation.end.toString());
+    if (_annotation.elementType === "mashedAnnotation") {
+        this.$.find('.Ldt-Annotation-Inner').addClass("Ldt-Annotation-isMashup");
+        this.$.find(".Ldt-Annotation-MashupMedia").html(_annotation.getMedia().title);
+        this.$.find(".Ldt-Annotation-MashupBegin").html(_annotation.annotation.begin.toString());
+        this.$.find(".Ldt-Annotation-MashupEnd").html(_annotation.annotation.end.toString());
+    } else {
+        this.$.find('.Ldt-Annotation-Inner').removeClass("Ldt-Annotation-isMashup");
+    }
     this.$.find(".Ldt-Annotation-Fb").attr("href", "http://www.facebook.com/share.php?" + IriSP.jQuery.param({ u: _url, t: _text }));
     this.$.find(".Ldt-Annotation-Twitter").attr("href", "https://twitter.com/intent/tweet?" + IriSP.jQuery.param({ url: _url, text: _text }));
     this.$.find(".Ldt-Annotation-Gplus").attr("href", "https://plusone.google.com/_/+1/confirm?" + IriSP.jQuery.param({ url: _url, title: _text }));
--- a/src/widgets/AnnotationsList.css	Fri May 11 19:22:13 2012 +0200
+++ b/src/widgets/AnnotationsList.css	Mon May 14 16:59:07 2012 +0200
@@ -66,14 +66,22 @@
     padding: 0;
     margin: 2px 0 0 82px;
 }
+
 li.Ldt-AnnotationsList-Tag-Li {
-    display: inline-block;
-    margin: 2px;
-    background: #0068c4;
-    color: #fff;
-    padding: 2px;
-    font-size: 12px;
+    display: inline-block; border: none; margin: 0 10px 5px 0; height: 23px; padding: 0 0 0 20px;
+    background: url(img/tag.png) left top no-repeat; font-weight: bold;
+    cursor: pointer;
+}
+
+.Ldt-AnnotationsList-Tag-Li span {
+    display: inline-block; font-size: 12px; height: 19px; padding: 4px 5px 0 0; border: none; margin: 0;
+    background: url(img/tag.png) right top no-repeat;
 }
+
 li.Ldt-AnnotationsList-Tag-Li:hover {
-    background: #F7268E;
+    background-position: left bottom;
 }
+
+.Ldt-AnnotationsList-Tag-Li:hover span {
+    background-position: right bottom;
+}
\ No newline at end of file
--- a/src/widgets/AnnotationsList.js	Fri May 11 19:22:13 2012 +0200
+++ b/src/widgets/AnnotationsList.js	Mon May 14 16:59:07 2012 +0200
@@ -23,7 +23,6 @@
      * e.g. http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/front/player/{{media}}/{{project}}/{{annotationType}}#id={{annotation}}
      */
     foreign_url : "",
-    cinecast_version : false,
     annotation_type : false,
     refresh_interval : 0,
     limit_count : 10,
@@ -50,7 +49,7 @@
     + '{{#tags}}'
     + '{{#.}}'
     + '<li class="Ldt-AnnotationsList-Tag-Li">'
-    + '<div class="Ldt-AnnotationsList-Tag-Div">{{.}}</div>'
+    + '<span>{{.}}</span>'
     + '</li>'
     + '{{/.}}'
     + '{{/tags}}'
@@ -61,12 +60,6 @@
     + '</ul>'
     + '</div>';
 
-IriSP.Widgets.AnnotationsList.prototype.clear = function() {
-};
-
-IriSP.Widgets.AnnotationsList.prototype.clearWidget = function() {
-};
-
 IriSP.Widgets.AnnotationsList.prototype.onSearch = function(searchString) {
     this.searchString = typeof searchString !== "undefined" ? searchString : '';
     var _n = this.refresh(true);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/widgets/MediaList.css	Mon May 14 16:59:07 2012 +0200
@@ -0,0 +1,86 @@
+.Ldt-MediaListWidget a {
+    text-decoration: none;
+}
+
+.Ldt-MediaListWidget h2 {
+    clear: both;
+}
+
+.Ldt-MediaList-NowContainer {
+    min-height: 60px;
+    margin: 2px 0;
+}
+
+h3.Ldt-MediaList-Now-Title {
+    font-size: 13px;
+    margin: 2px 2px 0 82px;
+    font-weight: bold;
+}
+
+.Ldt-MediaListWidget h3 a {
+    color: #0068c4;
+}
+
+p.Ldt-MediaList-Now-Description {
+    margin: 2px 0 2px 82px;
+    font-size: 12px;
+    color: #666666;
+}
+
+ul.Ldt-MediaList-OtherList {
+    list-style: none;
+    padding: 2px;
+    margin: 0;
+}
+
+li.Ldt-MediaList-OtherList-li {
+    width: 100%;
+    clear: both;
+    margin: 2px 0;
+    padding: 2px 0;
+    min-height: 48px;
+}
+
+.Ldt-MediaList-OtherList-li:hover, .Ldt-MediaList-NowContainer:hover {
+    background: url(img/pinstripe-grey.png);
+}
+
+.Ldt-MediaList-Now-ThumbContainer, .Ldt-MediaList-Other-ThumbContainer {
+    float: left;
+    width: 80px;
+    height: 50px;
+    text-align: center;
+    margin: 2px 0;
+}
+
+.Ldt-MediaList-Now-ThumbContainer {
+    float: left;
+    width: 80px;
+    height: 50px;
+    text-align: center;
+    margin: 2px 0;
+}
+
+.Ldt-MediaList-Other-ThumbContainer {
+    width: 60px;
+    height: 38px;
+}
+
+.Ldt-MediaList-Now-Thumbnail, .Ldt-MediaList-Other-Thumbnail {
+    border: none;
+    max-width: 100%;
+    max-height: 100%;
+    margin: 0 auto;
+}
+
+h3.Ldt-MediaList-Other-Title {
+    font-size: 12px;
+    margin: 2px 2px 0 62px;
+    font-weight: bold;
+}
+
+p.Ldt-MediaList-Other-Description {
+    margin: 2px 0 2px 62px;
+    font-size: 10px;
+    color: #666666;
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/widgets/MediaList.js	Mon May 14 16:59:07 2012 +0200
@@ -0,0 +1,113 @@
+IriSP.Widgets.MediaList = function(player, config) {
+    IriSP.Widgets.Widget.call(this, player, config);
+    this.lastMedia = false;
+};
+
+IriSP.Widgets.MediaList.prototype = new IriSP.Widgets.Widget();
+
+IriSP.Widgets.MediaList.prototype.messages = {
+    "fr": {
+        now_playing: "Média en cours",
+        all_media: "Tous les medias",
+        other_media: "Autres médias"
+    },
+    "en": {
+        now_playing: "Now playing",
+        all_media: "All media",
+        other_media: "Other media"
+    }
+}
+
+IriSP.Widgets.MediaList.prototype.defaults = {
+    annotation_type: false,
+    default_thumbnail : "http://ldt.iri.centrepompidou.fr/static/site/ldt/css/imgs/video_sequence.png",
+    media_url_template : "http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/front/player/{{media}}/"
+};
+
+IriSP.Widgets.MediaList.prototype.template =
+    '<div class="Ldt-MediaList-NowPlaying"><h2>{{l10n.now_playing}}</h2><hr />'
+    + '<div class="Ldt-MediaList-NowContainer">'
+    + '<div class="Ldt-MediaList-Now-ThumbContainer"><a href="" target="_blank">'
+    + '<img class="Ldt-MediaList-Now-Thumbnail" src="" /></a></div>'
+    + '<h3 class="Ldt-MediaList-Now-Title"><a href="" target="_blank"></a></h3>'
+    + '<p class="Ldt-MediaList-Now-Description"></p></div>'
+    + '<div class="Ldt-MediaList-Other"><h2></h2><hr /><ul class="Ldt-MediaList-OtherList"></ul></div></div>';
+
+IriSP.Widgets.MediaList.prototype.mediaTemplate =
+    '<li class="Ldt-MediaList-OtherList-li"><div class="Ldt-MediaList-Other-ThumbContainer"><a href="{{url}}" target="_blank">'
+    + '<img class="Ldt-MediaList-Other-Thumbnail" src="{{thumbnail}}" /></a></div>'
+    + '<h3 class="Ldt-MediaList-Other-Title"><a href="{{url}}" target="_blank">{{title}}</a></h3>'
+    + '<p class="Ldt-MediaList-Other-Description">{{description}}</p></li>'
+
+IriSP.Widgets.MediaList.prototype.onSearch = function(searchString) {
+    this.searchString = typeof searchString !== "undefined" ? searchString : '';
+    var _n = this.refresh(true);
+    if (this.searchString) {
+        if (_n) {
+            this.player.popcorn.trigger("IriSP.search.matchFound");
+        } else {
+            this.player.popcorn.trigger("IriSP.search.noMatchFound");
+        }
+    }
+}
+
+IriSP.Widgets.MediaList.prototype.draw = function() {
+    this.bindPopcorn("timeupdate","onTimeupdate");
+    this.$.addClass("Ldt-MediaListWidget")
+    this.renderTemplate();
+    this.redraw();
+};
+
+IriSP.Widgets.MediaList.prototype.redraw = function() {
+    var _media = this.lastMedia ? this.source.getElement(this.lastMedia) : undefined;
+    if (typeof _media !== "undefined") {
+        this.$.find('.Ldt-MediaList-Other h2').html(this.l10n.other_media);
+        this.$.find('.Ldt-MediaList-NowPlaying').show();
+        this.$.find('.Ldt-MediaList-Now-Thumbnail').attr("src", _media.thumbnail || this.default_thumbnail);
+        this.$.find('.Ldt-MediaList-Now-Title a').html(_media.title);
+        this.$.find('.Ldt-MediaList-Now-Description').html(_media.description);
+        var _url = _media.url || Mustache.to_html(
+                this.media_url_template, {
+                    media: _media.namespacedId.name
+                });
+        this.$.find('.Ldt-MediaList-NowContainer a').attr("href", _url);
+    } else {
+        this.$.find('.Ldt-MediaList-Other h2').html(this.l10n.all_media);
+        this.$.find('.Ldt-MediaList-NowPlaying').hide();
+    }
+    var _this = this,
+        _otherlist = this.source.getMedias().filter(function(_media) {
+            return (_media.id !== _this.lastMedia)
+        });
+    if (_otherlist.length) {
+        this.$.find('.Ldt-MediaList-Other').show();
+        var _html = _otherlist.map(function(_media) {
+            return Mustache.to_html(_this.mediaTemplate, {
+                thumbnail: _media.thumbnail || _this.default_thumbnail,
+                url: _media.url || Mustache.to_html(
+                    _this.media_url_template, {
+                        media: _media.namespacedId.name
+                    }),
+                title: _media.title,
+                description: _media.description
+            })
+        }).join("");
+        this.$.find('.Ldt-MediaList-OtherList').html(_html);
+    } else {
+        this.$.find('.Ldt-MediaList-Other').hide();
+    }
+};
+
+IriSP.Widgets.MediaList.prototype.onTimeupdate = function() {
+    var _time = Math.floor(this.player.popcorn.currentTime() * 1000),
+        _list = this.getWidgetAnnotations().filter(function(_annotation) {
+            return _annotation.begin <= _time && _annotation.end > _time;
+        });
+    if (_list.length) {
+        var _media = _list[0].getMedia();
+        if (_media.id !== this.lastMedia) {
+            this.lastMedia = _media.id;
+            this.redraw();
+        }
+    }
+}
--- a/src/widgets/Trace.js	Fri May 11 19:22:13 2012 +0200
+++ b/src/widgets/Trace.js	Mon May 14 16:59:07 2012 +0200
@@ -46,9 +46,6 @@
         }
         _this.player.popcorn.listen(_listener, _f);
     });
-    this.player.popcorn.listen("timeupdate", IriSP._.throttle(function(_arg) {
-        _this.eventHandler(_listener, _arg);
-    }));
     
     this.tracer = window.tracemanager.init_trace("test", {
         url: this.url,
Binary file src/widgets/img/tag.png has changed
--- a/test/mashup/bab_files/mashup.json	Fri May 11 19:22:13 2012 +0200
+++ b/test/mashup/bab_files/mashup.json	Mon May 14 16:59:07 2012 +0200
@@ -12,7 +12,49 @@
             "contents": ["c4ff2454-9842-11e1-9f9f-00145ea4a2be"]
         }
     ],
-    "tags": null,
+    "tags": [
+        {
+            "meta": {
+                "dc:title": "jeux vidéo"
+            },
+            "id": "jeux_video"
+        }, {
+            "meta": {
+                "dc:title": "intelligence collective"
+            },
+            "id": "intelligence_collective"
+        }, {
+            "meta": {
+                "dc:title": "gamification"
+            },
+            "id": "gamification"
+        }, {
+            "meta": {
+                "dc:title": "nouveaux médias"
+            },
+            "id": "nouveaux_medias"
+        }, {
+            "meta": {
+                "dc:title": "world wide web"
+            },
+            "id": "www"
+        }, {
+            "meta": {
+                "dc:title": "hypertexte"
+            },
+            "id": "hypertexte"
+        }, {
+            "meta": {
+                "dc:title": "données liées"
+            },
+            "id": "donnees_liees"
+        }, {
+            "meta": {
+                "dc:title": "données ouvertes"
+            },
+            "id": "donnees_ouvertes"
+        }
+    ],
     "lists": [
         {
             "items": [
@@ -68,7 +110,7 @@
                 "dc:title": "RSLN -  Jane McGonigal",
                 "dc:creator.contents": "IRI",
                 "dc:modified": "2012-02-13T11:55:33.052583",
-                "dc:description": ""
+                "dc:description": "Regards sur le Numérique, 16 septembre 2011, Jane McGonigal. Comment le jeu vidéo va changer le monde ?"
             },
             "id": "c1a84ff8-e2b0-11e0-8472-00145ea49a02",
             "unit": "ms"
@@ -89,7 +131,7 @@
                 "dc:title": "WWW 2012 - Tim Berners-Lee",
                 "dc:creator.contents": "IRI",
                 "dc:modified": "2012-05-07T17:08:36.018270",
-                "dc:description": ""
+                "dc:description": "World Wide Web Conference 2012, Wednesday 18/04, 11:00-12:30, Keynote by Tim Berners-Lee, graduate of Oxford University, inventor of the World Wide Web, an internet-based hypermedia initiative for global information sharing while at CERN, the European Particle Physics Laboratory, in 1989."
             },
             "id": "c4ff2454-9842-11e1-9f9f-00145ea4a2be",
             "unit": "ms"
@@ -133,18 +175,24 @@
                 "dc:creator": "perso"
             },
             "end": 425000,
-            "tags": null,
+            "tags": [
+                {
+                    "id-ref": "jeux_video"
+                }, {
+                    "id-ref": "gamification"
+                }
+            ],
             "color": "16763904",
             "media": "c1a84ff8-e2b0-11e0-8472-00145ea49a02",
             "id": "s_48D417FA-D34B-C954-05F6-3C4B9392367E"
         }, {
             "content": {
                 "mimetype": "application/x-ldt-structured",
-                "description": "",
+                "description": "Second segment from Jane McGonigal",
                 "img": {
                     "src": ""
                 },
-                "title": "",
+                "title": "McGonigal 2",
                 "color": "16763904",
                 "polemics": [],
                 "audio": {
@@ -162,18 +210,24 @@
                 "dc:creator": "perso"
             },
             "end": 995096,
-            "tags": null,
+            "tags": [
+                {
+                    "id-ref": "nouveaux_medias"
+                }, {
+                    "id-ref": "intelligence_collective"
+                }
+            ],
             "color": "16763904",
             "media": "c1a84ff8-e2b0-11e0-8472-00145ea49a02",
             "id": "s_5D30DD53-BE06-49E0-EB72-3C4B99BA0AA4"
         }, {
             "content": {
                 "mimetype": "application/x-ldt-structured",
-                "description": "Second segment from Jane McGonigal",
+                "description": "Third segment from Jane McGonigal",
                 "img": {
                     "src": ""
                 },
-                "title": "McGonigal 2",
+                "title": "McGonigal 3",
                 "color": "16763904",
                 "polemics": [],
                 "audio": {
@@ -191,18 +245,22 @@
                 "dc:creator": "perso"
             },
             "end": 1860044,
-            "tags": null,
+            "tags": [
+                {
+                    "id-ref": "jeux_video"
+                }
+            ],
             "color": "16763904",
             "media": "c1a84ff8-e2b0-11e0-8472-00145ea49a02",
             "id": "s_2B3C5B17-FB5E-8B99-AEDA-3C4BA2EB4234"
         }, {
             "content": {
                 "mimetype": "application/x-ldt-structured",
-                "description": "Third segment from Jane McGonigal",
+                "description": "Fourth segment from Jane McGonigal",
                 "img": {
                     "src": ""
                 },
-                "title": "McGonigal 3",
+                "title": "McGonigal 4",
                 "color": "16763904",
                 "polemics": [],
                 "audio": {
@@ -220,18 +278,24 @@
                 "dc:creator": "perso"
             },
             "end": 2460096,
-            "tags": null,
+            "tags": [
+                {
+                    "id-ref": "jeux_video"
+                }, {
+                    "id-ref": "www"
+                }
+            ],
             "color": "16763904",
             "media": "c1a84ff8-e2b0-11e0-8472-00145ea49a02",
             "id": "s_2376F9F0-AC9A-229C-9A60-3C4BAEE2D03F"
         }, {
             "content": {
                 "mimetype": "application/x-ldt-structured",
-                "description": "Fourth segment from Jane McGonigal",
+                "description": "Fifth segment from Jane McGonigal",
                 "img": {
                     "src": ""
                 },
-                "title": "McGonigal 4",
+                "title": "McGonigal 5",
                 "color": "16763904",
                 "polemics": [],
                 "audio": {
@@ -249,7 +313,15 @@
                 "dc:creator": "perso"
             },
             "end": 3250000,
-            "tags": null,
+            "tags": [
+                {
+                    "id-ref": "jeux_video"
+                }, {
+                    "id-ref": "nouveaux_medias"
+                }, {
+                    "id-ref": "gamification"
+                }
+            ],
             "color": "16763904",
             "media": "c1a84ff8-e2b0-11e0-8472-00145ea49a02",
             "id": "s_0DB7AABB-3973-9352-95DF-3C4BC3DCFB2D"
@@ -278,7 +350,17 @@
                 "dc:creator": "perso"
             },
             "end": 380000,
-            "tags": null,
+            "tags": [
+                {
+                    "id-ref": "hypertexte"
+                }, {
+                    "id-ref": "www"
+                }, {
+                    "id-ref": "donnees_ouvertes"
+                }, {
+                    "id-ref": "donnees_liees"
+                }
+            ],
             "color": "10027008",
             "media": "c4ff2454-9842-11e1-9f9f-00145ea4a2be",
             "id": "s_471A1070-AAD9-32F6-1E1B-3C4D52B5E4B9"
@@ -336,7 +418,11 @@
                 "dc:creator": "perso"
             },
             "end": 2035000,
-            "tags": null,
+            "tags": [
+                {
+                    "id-ref": "www"
+                }
+            ],
             "color": "10027008",
             "media": "c4ff2454-9842-11e1-9f9f-00145ea4a2be",
             "id": "s_E8C653B6-2B35-B2D6-1040-3C4D75BDF31B"
@@ -365,7 +451,11 @@
                 "dc:creator": "perso"
             },
             "end": 2940000,
-            "tags": null,
+            "tags": [
+                {
+                    "id-ref": "hypertexte"
+                }
+            ],
             "color": "10027008",
             "media": "c4ff2454-9842-11e1-9f9f-00145ea4a2be",
             "id": "s_971168A0-A9B3-064D-46B4-3C4D7FA5DFD5"
@@ -397,17 +487,7 @@
                 "dc:title": "Example mashup",
                 "dc:description": "This is an example mashup"
             },
-            "segments": [
-                "s_48D417FA-D34B-C954-05F6-3C4B9392367E",
-                "s_5D30DD53-BE06-49E0-EB72-3C4B99BA0AA4",
-                "s_471A1070-AAD9-32F6-1E1B-3C4D52B5E4B9",
-                "s_2B3C5B17-FB5E-8B99-AEDA-3C4BA2EB4234",
-                "s_7EB7522B-82D7-4FD6-2C5F-3C4D6945539E",
-                "s_2376F9F0-AC9A-229C-9A60-3C4BAEE2D03F",
-                "s_E8C653B6-2B35-B2D6-1040-3C4D75BDF31B",
-                "s_971168A0-A9B3-064D-46B4-3C4D7FA5DFD5",
-                "s_0DB7AABB-3973-9352-95DF-3C4BC3DCFB2D"
-            ]
+            "segments": ["s_48D417FA-D34B-C954-05F6-3C4B9392367E", "s_5D30DD53-BE06-49E0-EB72-3C4B99BA0AA4", "s_471A1070-AAD9-32F6-1E1B-3C4D52B5E4B9", "s_2B3C5B17-FB5E-8B99-AEDA-3C4BA2EB4234", "s_7EB7522B-82D7-4FD6-2C5F-3C4D6945539E", "s_2376F9F0-AC9A-229C-9A60-3C4BAEE2D03F", "s_E8C653B6-2B35-B2D6-1040-3C4D75BDF31B", "s_971168A0-A9B3-064D-46B4-3C4D7FA5DFD5", "s_0DB7AABB-3973-9352-95DF-3C4BC3DCFB2D"]
         }
     ]
 }
\ No newline at end of file
--- a/test/mashup/player.htm	Fri May 11 19:22:13 2012 +0200
+++ b/test/mashup/player.htm	Mon May 14 16:59:07 2012 +0200
@@ -36,8 +36,7 @@
                 <div id="LdtPlayer"></div>
             </div>
             <div class="coldroite">
-                <h2>Média en cours</h2>
-                <hr />
+                <div id="mediaList"></div>
             </div>
             <div class="footer">
                 <hr />
@@ -48,14 +47,14 @@
 
 IriSP.libFiles.defaultDir = "../libs/";
 IriSP.widgetsDir = "../metadataplayer";
-IriSP.jwplayer_swf_path = "../player.swf";
+IriSP.language = 'fr';
 var _metadata = {
     url: 'bab_files/mashup.json',
     format: 'ldt'
 };
 var _config = {            
     gui: {
-        width : 620,
+        width : 630,
         container : 'LdtPlayer',
         default_options: {
             metadata: _metadata
@@ -72,14 +71,19 @@
             {
                 type: "Annotation",
                 annotation_type: false
-            }
+            },
+            {
+                type: "MediaList",
+                container: "mediaList"
+            },
+            { type: "Mediafragment" }
         ]
     },
     player:{
         type:'mashup',
         live: true, 
         height: 350,
-        width: 620, 
+        width: 630, 
         provider: "rtmp",
         mashup_swf : "bab_files/player_bab_ldt.swf",
         mashup_xml : "bab_files/mashup.xml",
--- a/test/mashup/style.css	Fri May 11 19:22:13 2012 +0200
+++ b/test/mashup/style.css	Mon May 14 16:59:07 2012 +0200
@@ -49,7 +49,7 @@
 }
 
 .step {
-    width: 256px; height: 70px; float: left;
+    width: 256px; height: 70px; float: left; cursor: pointer;
 }
 
 .step-separator {
@@ -93,7 +93,7 @@
 }
 
 .colgauche {
-    float: left; width: 630px; margin: 5px 10px 5px 0;
+    float: left; width: 630px; margin: 5px 10px 5px 0; min-height: 650px;
 }
 
 .coldroite {