diff -r d1e891627286 -r ec3e6d34462c src/js/widgets/segmentsWidget.js --- a/src/js/widgets/segmentsWidget.js Wed Nov 09 14:49:20 2011 +0100 +++ b/src/js/widgets/segmentsWidget.js Wed Nov 09 17:06:23 2011 +0100 @@ -17,7 +17,9 @@ var self = this; var annotations = this._serializer._data.annotations; - this.positionMarker = this.selector.append("
"); + this.selector.append(""); + this.positionMarker = this.selector.children(":first"); + this._Popcorn.listen("timeupdate", IriSP.wrap(this, this.positionUpdater)); this.selector.after(""); // we need to do this because the segments are floated @@ -83,7 +85,7 @@ IriSP.SegmentsWidget.prototype.clickHandler = function(annotation) { var begin = Math.round((+ annotation.begin) / 1000); - this._Popcorn.currentTime(begin) + this._Popcorn.currentTime(begin); }; IriSP.SegmentsWidget.prototype.searchHandler = function(searchString) { @@ -128,7 +130,7 @@ IriSP.SegmentsWidget.prototype.positionUpdater = function() { var duration = this._serializer.currentMedia().meta["dc:duration"] / 1000; var time = this._Popcorn.currentTime(); - var position = IriSP.timeToPourcent(begin, duration); - - this.positionMarker.css("left", position); + var position = ((time / duration) * 100).toFixed(2); + + this.positionMarker.css("left", position + "%"); }; \ No newline at end of file