diff -r 36df3a25d7bd -r 4f082f63e295 web/LdtPlayer-release.js --- a/web/LdtPlayer-release.js Mon Dec 19 13:10:08 2011 +0100 +++ b/web/LdtPlayer-release.js Mon Dec 19 16:10:39 2011 +0100 @@ -8670,11 +8670,11 @@ }; -IriSP.annotation_template = "{{! template for an annotation displayed in a segmentWidget }}
"; +IriSP.annotation_template = "{{! template for an annotation displayed in a segmentWidget }}
"; IriSP.annotationWidget_template = "{{! template for the annotation widget }}
share on facebook share on twitter share on google+
"; IriSP.annotation_loading_template = "{{! template shown while the annotation widget is loading }}
 
Chargement...
"; IriSP.arrowWidget_template = "
"; -IriSP.overlay_marker_template = "{{! the template for the small white bars which is z-indexed over our segment widget }}
"; +IriSP.overlay_marker_template = "{{! the template for the small bars which is z-indexed over our segment widget }}
"; IriSP.player_template = "{{! template for the radio player }}
/
"; IriSP.search_template = "{{! template for the search container }}
"; IriSP.share_template = "{{! social network sharing template }}       "; @@ -10500,14 +10500,11 @@ var startPourcent = IriSP.timeToPourcent(begin, duration); /* surprisingly, the following code doesn't work on webkit - for some reason, most of the - boxes are 3 pixels wider. + boxes are 3 pixels smaller. */ - if (IriSP.jQuery.browser.webkit) { console.log("webkit"); - var endPourcent = (IriSP.timeToPourcent(end, duration) - startPourcent - onePxPercent * 4.5).toFixed(1); - } - else - var endPourcent = (IriSP.timeToPourcent(end, duration) - startPourcent - onePxPercent * 1.5).toFixed(1); - + var endPourcent = Math.floor(IriSP.timeToPourcent(end, duration) - startPourcent); + var endPixel = Math.floor(this.selector.parent().width() * (endPourcent / 100)) - 2; + if (i == 0) { endPourcent -= onePxPercent; @@ -10529,10 +10526,9 @@ var annotationTemplate = Mustache.to_html(IriSP.annotation_template, {"divTitle" : divTitle, "id" : id, "startPourcent" : startPourcent, - "endPourcent" : endPourcent, "hexa_color" : hexa_color, + "endPixel" : endPixel, "hexa_color" : hexa_color, "seekPlace" : Math.round(begin/1000)}); - this.selector.append(annotationTemplate); // IriSP.jQuery("#" + id).tooltip({ effect: 'slide'}); @@ -10617,6 +10613,7 @@ IriSP.SegmentsWidget.prototype.positionUpdater = function() { var duration = this._serializer.currentMedia().meta["dc:duration"] / 1000; var time = this._Popcorn.currentTime(); + //var position = ((time / duration) * 100).toFixed(2); var position = ((time / duration) * 100).toFixed(2); this.positionMarker.css("left", position + "%"); @@ -10647,12 +10644,14 @@ this.sliderMaximized = false; this.timeOutId = null; + this.positionMarker.draggable({axis: "x", start: IriSP.wrap(this, this.positionMarkerDraggingStartedHandler), stop: IriSP.wrap(this, this.positionMarkerDraggedHandler), containment: "parent" }); - + this.positionMarker.css("position", "absolute"); + this.sliderBackground.click(function(event) { self.backgroundClickHandler.call(self, event); }); this.sliderForeground.click(function(event) { self.foregroundClickHandler.call(self, event); }); @@ -10735,7 +10734,7 @@ this.sliderBackground.animate({"height": "9px"}, 100); this.sliderForeground.animate({"height": "9px"}, 100); this.positionMarker.animate({"height": "9px", "width": "9px"}, 100); - this.positionMarker.css("margin-top", "-4px"); + //this.positionMarker.css("margin-top", "-4px"); // this.selector.removeClass("Ldt-SliderMinimized"); // this.selector.addClass("Ldt-SliderMaximized");