Index: trunk/phase3/js2/mwEmbed/libAddMedia/mvAdvFirefogg.js |
— | — | @@ -716,6 +716,12 @@ |
717 | 717 | var _this = this; |
718 | 718 | //do the base encoder settings setup: |
719 | 719 | this.basefogg_autoEncoderSettings(); |
| 720 | + |
| 721 | + //special case see if we already have ogg video in adv encoder expose encode settings anyway: |
| 722 | + if( _this.isOggFormat() ){ |
| 723 | + _this.encoder_settings['passthrough'] = false; |
| 724 | + } |
| 725 | + |
720 | 726 | //make sure we are "encoding" if not display not a video file eror: |
721 | 727 | if( this.encoder_settings['passthrough'] ){ |
722 | 728 | js_log("in passthrough mode (hide control)"); |
Index: trunk/phase3/js2/mwEmbed/libAddMedia/mvFirefogg.js |
— | — | @@ -379,10 +379,12 @@ |
380 | 380 | function getFrame() { |
381 | 381 | var v = $j('#fogg_preview_vid').get(0); |
382 | 382 | var canvas = $j('#fogg_preview_canvas').get(0); |
383 | | - canvas.width = 160; |
384 | | - canvas.height = canvas.width * v.videoHeight/v.videoWidth; |
385 | | - var ctx = canvas.getContext("2d"); |
386 | | - ctx.drawImage(v, 0, 0, canvas.width, canvas.height); |
| 383 | + if( canvas ){ |
| 384 | + canvas.width = 160; |
| 385 | + canvas.height = canvas.width * v.videoHeight/v.videoWidth; |
| 386 | + var ctx = canvas.getContext("2d"); |
| 387 | + ctx.drawImage(v, 0, 0, canvas.width, canvas.height); |
| 388 | + } |
387 | 389 | } |
388 | 390 | var previewI=null; |
389 | 391 | function preview() { |
— | — | @@ -695,16 +697,31 @@ |
696 | 698 | function resizeVid(){ |
697 | 699 | var v = $j('#fogg_final_vid').get(0); |
698 | 700 | if( v.videoWidth > 720 ){ |
699 | | - $j(v).css({ |
700 | | - 'width':720, |
701 | | - 'height': 720 * (v.videoHeight/v.videoWidth) |
702 | | - }); |
| 701 | + var vW = 720; |
| 702 | + var vH = 720 * (v.videoHeight/v.videoWidth) |
703 | 703 | }else{ |
704 | | - $j(v).css({ |
705 | | - 'width': v.videoWidth, |
706 | | - 'height': v.videoHeight |
| 704 | + var vW = v.videoWidth; |
| 705 | + var vH = v.videoHeight; |
| 706 | + } |
| 707 | + //reize the video: |
| 708 | + $j(v).css({ |
| 709 | + 'width' : vW, |
| 710 | + 'height': vH |
| 711 | + }); |
| 712 | + //if large video resize the dialog box: |
| 713 | + if( vW > 400){ |
| 714 | + //also resize the dialog box |
| 715 | + $j('#upProgressDialog').parent().animate({ |
| 716 | + 'width': vW + 5, |
| 717 | + 'height' : vH + 30 |
707 | 718 | }); |
708 | | - } |
| 719 | + |
| 720 | + //also position the parent container |
| 721 | + $j('#upProgressDialog').parent().animate({ |
| 722 | + 'left': ($j(document).width() - (vW + 5) )/2 , |
| 723 | + 'top': ($j(document).height() - (vH + 30) )/2 |
| 724 | + }); |
| 725 | + } |
709 | 726 | } |
710 | 727 | |
711 | 728 | //set flag to diplay video at res |
Index: trunk/phase3/js2/mwEmbed/mv_embed.js |
— | — | @@ -88,7 +88,7 @@ |
89 | 89 | var mv_embed_path = getMvEmbedPath(); |
90 | 90 | } |
91 | 91 | |
92 | | -// Init the global message table if it has not been initialised already |
| 92 | +// Init the global message table if it has not been initialized already |
93 | 93 | if( !gMsg ) { |
94 | 94 | var gMsg = {}; |
95 | 95 | } |