integration/js/editor.js
changeset 92 54cd42adea33
parent 73 475e5fb0ea2b
child 97 213e81430f7a
--- a/integration/js/editor.js	Mon Dec 03 13:06:28 2012 +0100
+++ b/integration/js/editor.js	Mon Dec 03 13:57:52 2012 +0100
@@ -45,6 +45,7 @@
             '<div class="media-found-list" style="height: <%= height %>px"><div class="media-segment-list-inner"></div><%= segments %></div>'
         ),
         mashupstatus = '',
+        mediasegmentscache = {},
         addMode, currentMedia, currentSegment;
         
     IriSP.mashupcore(project, mashup);
@@ -127,7 +128,9 @@
                 serializer: IriSP.serializers.segmentapi
             }).onLoad(function() {
                 var medias = this.getMedias(),
-                    annotations = this.getAnnotations();
+                    annotations = this.getAnnotations().filter(function(annotation) {
+                        return annotation.getDuration() > 0;
+                    });;
                 if (medias && medias.length) {
                     var mediaid = medias[0].id;
                     el = $(".item-video[data-media-id='" + mediaid + "'] .media-count");
@@ -352,8 +355,6 @@
         }
     }
     
-    var mediasegmentscache = {};
-    
     function setMedia(media) {
         if (currentMedia) {
             currentMedia.pause();