Merge with upstream
authorhamidouk
Tue, 31 Jan 2012 16:02:39 +0100
changeset 494 7779fbe8432e
parent 493 332e3f37e392 (diff)
parent 492 f48e7b755b61 (current diff)
child 495 1c50afe6a949
child 496 e69f668634df
Merge with upstream
--- a/src/ldt/ldt/static/ldt/js/LdtPlayer-release.js	Tue Jan 31 15:41:01 2012 +0100
+++ b/src/ldt/ldt/static/ldt/js/LdtPlayer-release.js	Tue Jan 31 16:02:39 2012 +0100
@@ -2745,9 +2745,14 @@
   
   var currentTime = this._Popcorn.currentTime();
   var currentAnnotation = this._serializer.currentChapitre(currentTime);
-  if (IriSP.null_or_undefined(currentAnnotation))
-    var currentAnnotation = this._serializer.currentAnnotation(currentTime)[0]; // FIXME : use the others ?
-
+  if (IriSP.null_or_undefined(currentAnnotation)) {
+    var c_annots = this._serializer.currentAnnotation(currentTime)
+    if (c_annots.length != 0)
+      var currentAnnotation = c_annots[0]; // FIXME : use the others ?
+    else
+      return;
+  }
+  
   /* move the arrow only if the current annotation changes */
   if (currentAnnotation != this._oldAnnotation) {
     var begin = (+ currentAnnotation.begin) / 1000;