equal
deleted
inserted
replaced
111 IriSP.Widgets.Widget.prototype.getWidgetAnnotations = function() { |
111 IriSP.Widgets.Widget.prototype.getWidgetAnnotations = function() { |
112 var _curmedia = this.source.currentMedia; |
112 var _curmedia = this.source.currentMedia; |
113 return typeof this.annotation_type !== "undefined" && this.annotation_type ? _curmedia.getAnnotationsByTypeTitle(this.annotation_type) : _curmedia.getAnnotations(); |
113 return typeof this.annotation_type !== "undefined" && this.annotation_type ? _curmedia.getAnnotationsByTypeTitle(this.annotation_type) : _curmedia.getAnnotations(); |
114 } |
114 } |
115 |
115 |
|
116 IriSP.Widgets.Widget.prototype.getWidgetAnnotationsAtTime = function() { |
|
117 var _time = Math.floor(this.player.popcorn.currentTime() * 1000); |
|
118 return this.getWidgetAnnotations().filter(function(_annotation) { |
|
119 return _annotation.begin <= _time && _annotation.end > _time; |
|
120 }); |
|
121 } |
|
122 |
116 /** |
123 /** |
117 * This method responsible of drawing a widget on screen. |
124 * This method responsible of drawing a widget on screen. |
118 */ |
125 */ |
119 IriSP.Widgets.Widget.prototype.draw = function() { |
126 IriSP.Widgets.Widget.prototype.draw = function() { |
120 /* implemented by "sub-classes" */ |
127 /* implemented by "sub-classes" */ |