added a method to get the current chapitre. popcorn-port
authorhamidouk
Thu, 12 Jan 2012 13:00:25 +0100
branchpopcorn-port
changeset 613 c2726c5c6477
parent 612 5292f847b43a
child 614 116de1c38a7d
added a method to get the current chapitre.
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() {