integration/js/mashupplayer.js
changeset 73 475e5fb0ea2b
parent 50 89e152523cb6
child 82 e36c35fb4468
--- a/integration/js/mashupplayer.js	Wed Nov 28 15:46:05 2012 +0100
+++ b/integration/js/mashupplayer.js	Wed Nov 28 17:21:26 2012 +0100
@@ -81,7 +81,18 @@
         })
         .on("mouseout", ".item-video", function() {
             project.trigger("mouseout-annotation");
-        })
+        });
+        
+        $(".mashup-frise")
+        .click(function(evt) {
+            if (!mashup.duration.milliseconds) {
+                return;
+            }
+            var el = $(this), t = ( evt.pageX - el.offset().left ) * mashup.duration / el.width(), segment = mashup.getAnnotationAtTime(t);
+            if (segment) {
+                project.trigger("click-annotation", segment.annotation);
+            }
+        });
         
         
     });