--- a/server/src/remie/static/remie/metadataplayer/Trace.js Mon Sep 28 14:32:54 2015 +0200
+++ b/server/src/remie/static/remie/metadataplayer/Trace.js Fri Oct 02 10:24:23 2015 +0200
@@ -68,6 +68,21 @@
this.tracer.trace("TraceWidgetInit", {});
+
+ // Configure annotation creation/update/delete/publish tracing
+ _this.player.on("Annotation.create", function (a) {
+ _this.tracer.trace("AnnotationCreated", { id: a.id, annotation_begin: a.begin.milliseconds, annotation_end: a.end.milliseconds, annotation_media: a.media.id, content_length: a.title.length, content_words: a.title.split(/\s+/).length });
+ });
+ _this.player.on("Annotation.delete", function (aid) {
+ _this.tracer.trace("AnnotationDeleted", { id: aid });
+ });
+ _this.player.on("Annotation.update", function (a) {
+ _this.tracer.trace("AnnotationUpdated", { id: a.id, annotation_begin: a.begin.milliseconds, annotation_end: a.end.milliseconds, annotation_media: a.media.id, content_length: a.title.length, content_words: a.title.split(/\s+/).length });
+ });
+ _this.player.on("Annotation.publish", function (a) {
+ _this.tracer.trace("AnnotationPublished", { id: a.id, annotation_begin: a.begin.milliseconds, annotation_end: a.end.milliseconds, annotation_media: a.media.id, content_length: a.title.length, content_words: a.title.split(/\s+/).length });
+ });
+
_this.player.trigger("trace-ready");
this.mouseLocation = '';
IriSP.jQuery(".Ldt-Widget").on("mousedown mouseenter mouseleave", ".Ldt-TraceMe", function(_e) {