r57577 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57576‎ | r57577 | r57578 >
Date:18:11, 9 October 2009
Author:j
Status:deferred
Tags:
Comment:
do not update hidden preview, hide preview in the end, so state is ok if one encodes another video
Modified paths:
  • /trunk/phase3/js2/mwEmbed/libAddMedia/mvFirefogg.js (modified) (history)

Diff [purge]

Index: trunk/phase3/js2/mwEmbed/libAddMedia/mvFirefogg.js
@@ -334,6 +334,12 @@
335335 if( _this.show_preview == true){
336336 $j('#fogg_preview_canvas').show();
337337 }else{
 338+ //update icon:
 339+ $j(this).children('.ui-icon')
 340+ .removeClass('ui-icon-triangle-1-s')
 341+ .addClass('ui-icon-triangle-1-e');
 342+ //update text:
 343+ $j(this).children('.btnText').text( gM('fogg-preview') );
338344 $j('#fogg_preview_canvas').hide();
339345 }
340346 //apply preview binding:
@@ -387,7 +393,7 @@
388394 ctx.drawImage(v, 0, 0, canvas.width, canvas.height);
389395 }
390396 }
391 - var previewI=null;
 397+ var previewI=null;
392398 function preview() {
393399 //initialize the video if not setup already:
394400 var v = $j('#fogg_preview_vid').get(0);
@@ -408,8 +414,11 @@
409415 var previewI = setInterval(function(){
410416 if (_this.fogg.status() != "encoding"){
411417 clearInterval(previewI);
412 - }
413 - v.load();
 418+ _this.show_preview == false;
 419+ }
 420+ if (_this.show_preview == true) {
 421+ v.load();
 422+ }
414423 }, 1000);
415424 }
416425 }

Status & tagging log