# HG changeset patch # User hamidouk # Date 1327661694 -3600 # Node ID 40339684b97443c68d1786b416cd7c8520a54c8e # Parent 582670c6985a736f42ba23a4d1972a483a94519c new player version. diff -r 582670c6985a -r 40339684b974 src/ldt/ldt/static/ldt/js/LdtPlayer-release.js --- a/src/ldt/ldt/static/ldt/js/LdtPlayer-release.js Fri Jan 27 11:28:34 2012 +0100 +++ b/src/ldt/ldt/static/ldt/js/LdtPlayer-release.js Fri Jan 27 11:54:54 2012 +0100 @@ -1384,7 +1384,7 @@ return this.playerFns.getPosition(); } else { var currentTime = +time; - this.playerFns.seek( currentTime ); + this.playerFns.seek(currentTime); return currentTime; } }; @@ -1460,8 +1460,7 @@ IriSP.PopcornReplacement.player.prototype.__seekHandler = function(event) { var i = 0; - - console.log("pos: %d, off: %d", event.position, event.offset); + for(i = 0; i < this.__codes.length; i++) { var c = this.__codes[i]; @@ -2489,7 +2488,9 @@ this._Popcorn.listen("IriSP.createAnnotationWidget.addedAnnotation", IriSP.wrap(this, function() { this.drawList(true); })); this._Popcorn.listen("timeupdate", IriSP.wrap(this, this.redraw)); } else { + /* update the widget when the video has finished loading and when it's seeked and paused */ this._Popcorn.listen("seeked", IriSP.wrap(this, this.ajaxRedraw)); + this._Popcorn.listen("loadedmetadata", IriSP.wrap(this, this.ajaxRedraw)); this._Popcorn.listen("paused", IriSP.wrap(this, this.ajaxRedraw)); }