# HG changeset patch # User hamidouk # Date 1326369625 -3600 # Node ID c2726c5c64774c1de8dec6b6e21a96c1af9b5832 # Parent 5292f847b43ad44112c5c2a6606fe0db76e35715 added a method to get the current chapitre. diff -r 5292f847b43a -r c2726c5c6477 src/js/serializers/JSONSerializer.js --- a/src/js/serializers/JSONSerializer.js Thu Jan 12 13:00:11 2012 +0100 +++ b/src/js/serializers/JSONSerializer.js Thu Jan 12 13:00:25 2012 +0100 @@ -265,6 +265,12 @@ return ret_array; }; +/** return the current chapitre + @param currentTime the current time, in seconds. +*/ +IriSP.JSONSerializer.prototype.currentChapitre = function(currentTime) { + return this.currentAnnotations(currentTime, this.getChapitrage())[0]; +}; /** returns a list of ids of tweet lines (aka: groups in cinelab) */ IriSP.JSONSerializer.prototype.getTweetIds = function() {