var _this = this;
//do the base encoder settings setup:
this.basefogg_autoEncoderSettings();
+
+ //special case see if we already have ogg video in adv encoder expose encode settings anyway:
+ if( _this.isOggFormat() ){
+ _this.encoder_settings['passthrough'] = false;
+ }
+
//make sure we are "encoding" if not display not a video file eror:
if( this.encoder_settings['passthrough'] ){
js_log("in passthrough mode (hide control)");
function getFrame() {
var v = $j('#fogg_preview_vid').get(0);
var canvas = $j('#fogg_preview_canvas').get(0);
- canvas.width = 160;
- canvas.height = canvas.width * v.videoHeight/v.videoWidth;
- var ctx = canvas.getContext("2d");
- ctx.drawImage(v, 0, 0, canvas.width, canvas.height);
+ if( canvas ){
+ canvas.width = 160;
+ canvas.height = canvas.width * v.videoHeight/v.videoWidth;
+ var ctx = canvas.getContext("2d");
+ ctx.drawImage(v, 0, 0, canvas.width, canvas.height);
+ }
}
var previewI=null;
function preview() {
function resizeVid(){
var v = $j('#fogg_final_vid').get(0);
if( v.videoWidth > 720 ){
- $j(v).css({
- 'width':720,
- 'height': 720 * (v.videoHeight/v.videoWidth)
- });
+ var vW = 720;
+ var vH = 720 * (v.videoHeight/v.videoWidth)
}else{
- $j(v).css({
- 'width': v.videoWidth,
- 'height': v.videoHeight
+ var vW = v.videoWidth;
+ var vH = v.videoHeight;
+ }
+ //reize the video:
+ $j(v).css({
+ 'width' : vW,
+ 'height': vH
+ });
+ //if large video resize the dialog box:
+ if( vW > 400){
+ //also resize the dialog box
+ $j('#upProgressDialog').parent().animate({
+ 'width': vW + 5,
+ 'height' : vH + 30
});
- }
+
+ //also position the parent container
+ $j('#upProgressDialog').parent().animate({
+ 'left': ($j(document).width() - (vW + 5) )/2 ,
+ 'top': ($j(document).height() - (vH + 30) )/2
+ });
+ }
}
//set flag to diplay video at res