From: Jan Gerber Date: Fri, 9 Oct 2009 18:11:35 +0000 (+0000) Subject: do not update hidden preview, hide preview in the end, so state is ok if one encodes... X-Git-Tag: 1.31.0-rc.0~39328 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=a54fd41b732adcbcad60522cf5a5a14010d7346d;p=lhc%2Fweb%2Fwiklou.git do not update hidden preview, hide preview in the end, so state is ok if one encodes another video --- diff --git a/js2/mwEmbed/libAddMedia/mvFirefogg.js b/js2/mwEmbed/libAddMedia/mvFirefogg.js index c0875c9abe..292f1ccc8b 100644 --- a/js2/mwEmbed/libAddMedia/mvFirefogg.js +++ b/js2/mwEmbed/libAddMedia/mvFirefogg.js @@ -334,6 +334,12 @@ mvFirefogg.prototype = { //extends mvBaseUploadInterface if( _this.show_preview == true){ $j('#fogg_preview_canvas').show(); }else{ + //update icon: + $j(this).children('.ui-icon') + .removeClass('ui-icon-triangle-1-s') + .addClass('ui-icon-triangle-1-e'); + //update text: + $j(this).children('.btnText').text( gM('fogg-preview') ); $j('#fogg_preview_canvas').hide(); } //apply preview binding: @@ -387,7 +393,7 @@ mvFirefogg.prototype = { //extends mvBaseUploadInterface ctx.drawImage(v, 0, 0, canvas.width, canvas.height); } } - var previewI=null; + var previewI=null; function preview() { //initialize the video if not setup already: var v = $j('#fogg_preview_vid').get(0); @@ -408,8 +414,11 @@ mvFirefogg.prototype = { //extends mvBaseUploadInterface var previewI = setInterval(function(){ if (_this.fogg.status() != "encoding"){ clearInterval(previewI); - } - v.load(); + _this.show_preview == false; + } + if (_this.show_preview == true) { + v.load(); + } }, 1000); } }