# HG changeset patch # User veltr # Date 1348034375 -32400 # Node ID d58d0dcdb640ff88b5f7c80c37e7185cfd5f1631 # Parent e1baacb52075525c9c552f5418afeb08b251f9e3 Bugfixes diff -r e1baacb52075 -r d58d0dcdb640 src/widgets/AnnotationsList.js --- a/src/widgets/AnnotationsList.js Wed Sep 19 14:11:49 2012 +0900 +++ b/src/widgets/AnnotationsList.js Wed Sep 19 14:59:35 2012 +0900 @@ -91,7 +91,6 @@ var _currentTime = this.media.getCurrentTime(), _duration = this.media.duration; this.lastAjaxQuery = _currentTime; - _currentTime = Math.floor(1000 * _currentTime); var _url = Mustache.to_html(this.ajax_url, { media : this.source.currentMedia.id, begin : Math.max(0, _currentTime - this.ajax_granularity), @@ -252,7 +251,7 @@ if (this.mashupMode) { this.ajaxMashup(); } else { - if (Math.abs(_currentTime - this.lastAjaxQuery) > (this.ajax_granularity / 2000)) { + if (Math.abs(_currentTime - this.lastAjaxQuery) > (this.ajax_granularity)) { this.ajaxSource(); } } diff -r e1baacb52075 -r d58d0dcdb640 src/widgets/JwpPlayer.js --- a/src/widgets/JwpPlayer.js Wed Sep 19 14:11:49 2012 +0900 +++ b/src/widgets/JwpPlayer.js Wed Sep 19 14:59:35 2012 +0900 @@ -47,7 +47,7 @@ // Binding functions to jwplayer this.media.getCurrentTime = function() { - return new IriSP.Model.Time(1000*_player.getPosition()); + return new IriSP.Model.Time(1000*_player.getPosition() || 0); } this.media.getVolume = function() { return _player.getVolume() / 100; diff -r e1baacb52075 -r d58d0dcdb640 test/jwplayer.htm --- a/test/jwplayer.htm Wed Sep 19 14:11:49 2012 +0900 +++ b/test/jwplayer.htm Wed Sep 19 14:59:35 2012 +0900 @@ -74,7 +74,10 @@ { type: "AnnotationsList", container: "AnnotationsListContainer", - default_thumbnail : "http://ldt.iri.centrepompidou.fr/static/site/ldt/css/imgs/video_sequence.png" + default_thumbnail : "http://ldt.iri.centrepompidou.fr/static/site/ldt/css/imgs/video_sequence.png", + ajax_url: "/pf/ldtplatform/api/ldt/segments/{{media}}/{{begin}}/{{end}}", + ajax_granularity : 300000, + default_thumbnail : "http://capsicum//pf/static/site/ldt/css/imgs/video_sequence.png" }, { type: "Mediafragment"} ]