diff -r d65dafb9273d -r 50c4609e50f4 src/js/widgets/segmentsWidget.js --- a/src/js/widgets/segmentsWidget.js Tue Nov 08 16:51:10 2011 +0100 +++ b/src/js/widgets/segmentsWidget.js Wed Nov 09 10:26:42 2011 +0100 @@ -17,6 +17,8 @@ var self = this; var annotations = this._serializer._data.annotations; + this.positionMarker = this.selector.append("
"); + this._Popcorn.listen("timeupdate", IriSP.wrap(this, this.positionUpdater)); this.selector.after("
"); // we need to do this because the segments are floated @@ -121,4 +123,12 @@ IriSP.SegmentsWidget.prototype.searchFieldClosedHandler = function() { this.clear(); +}; + +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); }; \ No newline at end of file