diff -r d4dc652bf050 -r 096c06aea8b5 src/js/widgets.js --- a/src/js/widgets.js Wed Jun 27 19:03:18 2012 +0200 +++ b/src/js/widgets.js Wed Jun 27 19:03:37 2012 +0200 @@ -113,6 +113,13 @@ return typeof this.annotation_type !== "undefined" && this.annotation_type ? _curmedia.getAnnotationsByTypeTitle(this.annotation_type) : _curmedia.getAnnotations(); } +IriSP.Widgets.Widget.prototype.getWidgetAnnotationsAtTime = function() { + var _time = Math.floor(this.player.popcorn.currentTime() * 1000); + return this.getWidgetAnnotations().filter(function(_annotation) { + return _annotation.begin <= _time && _annotation.end > _time; + }); +} + /** * This method responsible of drawing a widget on screen. */