equal
deleted
inserted
replaced
89 |
89 |
90 IriSP.Widgets.AnnotationsList.prototype.ajaxSource = function() { |
90 IriSP.Widgets.AnnotationsList.prototype.ajaxSource = function() { |
91 var _currentTime = this.media.getCurrentTime(), |
91 var _currentTime = this.media.getCurrentTime(), |
92 _duration = this.media.duration; |
92 _duration = this.media.duration; |
93 this.lastAjaxQuery = _currentTime; |
93 this.lastAjaxQuery = _currentTime; |
94 _currentTime = Math.floor(1000 * _currentTime); |
|
95 var _url = Mustache.to_html(this.ajax_url, { |
94 var _url = Mustache.to_html(this.ajax_url, { |
96 media : this.source.currentMedia.id, |
95 media : this.source.currentMedia.id, |
97 begin : Math.max(0, _currentTime - this.ajax_granularity), |
96 begin : Math.max(0, _currentTime - this.ajax_granularity), |
98 end : Math.min(_duration.milliseconds, _currentTime + this.ajax_granularity) |
97 end : Math.min(_duration.milliseconds, _currentTime + this.ajax_granularity) |
99 }); |
98 }); |
250 |
249 |
251 if (this.ajax_url) { |
250 if (this.ajax_url) { |
252 if (this.mashupMode) { |
251 if (this.mashupMode) { |
253 this.ajaxMashup(); |
252 this.ajaxMashup(); |
254 } else { |
253 } else { |
255 if (Math.abs(_currentTime - this.lastAjaxQuery) > (this.ajax_granularity / 2000)) { |
254 if (Math.abs(_currentTime - this.lastAjaxQuery) > (this.ajax_granularity)) { |
256 this.ajaxSource(); |
255 this.ajaxSource(); |
257 } |
256 } |
258 } |
257 } |
259 } |
258 } |
260 return _list.length; |
259 return _list.length; |