src/js/modules/mediafragment.js
branchpopcorn-port
changeset 758 7fdb2d92da58
parent 751 5cea0b550154
child 809 1997dae651c6
--- a/src/js/modules/mediafragment.js	Tue Jan 31 16:01:41 2012 +0100
+++ b/src/js/modules/mediafragment.js	Wed Feb 01 14:19:32 2012 +0100
@@ -26,7 +26,11 @@
                     // timecode 
                     if ( pageoffset.substring( 2 ) != null ) {
                     var offsettime = pageoffset.substring( 2 );
-                    this._Popcorn.currentTime( parseFloat( offsettime ) );
+                    this._Popcorn.currentTime( parseFloat(offsettime) );
+                    
+                    /* we have to trigger this signal manually because of a
+                     bug in the jwplayer */
+                    this._Popcorn.trigger("seeked", parseFloat(offsettime));
                     }
                   } else if ( pageoffset.substring(0, 3) === "id=") {
                     // annotation
@@ -36,7 +40,7 @@
                     this._serializer.sync(IriSP.wrap(this, function() {
                           this.lookupAnnotation.call(this, annotationId); 
                           }));
-                  }
+                  }                                    
               }
 };
 
@@ -98,6 +102,10 @@
 
   if (typeof(annotation) !== "undefined") {
     this._Popcorn.currentTime(annotation.begin / 1000);
+
+    /* we have to trigger this signal manually because of a
+     bug in the jwplayer */
+    this._Popcorn.trigger("seeked", annotation.begin / 1000);
     this._Popcorn.trigger("IriSP.Mediafragment.showAnnotation", annotationId);
   }