diff -r 1bcc79e78fa1 -r 74c9ddc3640b web/res/metadataplayer.polemic/src/js/polemic.js --- a/web/res/metadataplayer.polemic/src/js/polemic.js Mon Jul 18 13:40:06 2011 +0200 +++ b/web/res/metadataplayer.polemic/src/js/polemic.js Mon Jul 25 18:50:20 2011 +0200 @@ -113,43 +113,55 @@ url:config.metadata, success : function(json){ trace("load",""); - __IriSP.jQuery.each(json.annotations, function(i,item) { - - var MyTime = Math.floor(item.begin/duration*lineSize); - var Myframe = Math.floor(MyTime/lineSize*frameLenght); + // get current view (the first ???) + view = json.views[0]; + + // the tweets are by definition of the second annotation type + tweet_annot_type = null; + if(typeof(view.annotation_types) !== "undefined" && view.annotation_types.length > 1) { + tweet_annot_type = view.annotation_types[1]; + } + + + __IriSP.jQuery.each(json.annotations, function(i,item) { + + var MyTime = Math.floor(item.begin/duration*lineSize); + var Myframe = Math.floor(MyTime/lineSize*frameLenght); - if (item.content['polemics'] != undefined) { - if (item.content['polemics'][0] != null) { - - for(var j=0; j