"fogg-installed" : "Firefogg is Installed",
"fogg-for_improved_uplods" : "For Improved uploads: ",
"fogg-please_install" : "<a href=\"$1\">Install Firefogg</a>. More <a href=\"http://commons.wikimedia.org/wiki/Commons:Firefogg\">about firefogg</a>",
- "fogg-use_latest_fox" : "Please first install <a href=\"http://www.mozilla.com/en-US/firefox/upgrade.html?from=firefogg\">Firefox 3.5</a>. <i>then revisit this page to install the <b>firefogg</b> extention</i>",
+ "fogg-use_latest_fox" : "Please first install <a href=\"http://www.mozilla.com/en-US/firefox/upgrade.html?from=firefogg\">Firefox 3.5</a> (or later). <i>then revisit this page to install the <b>firefogg</b> extention</i>",
"fogg-passthrough_mode" : "Your selected file is already ogg or not a video file",
"fogg-transcoding" : "Encoding Video to Ogg",
"fogg-encoding-done" : "Encoding Done"
_this.selectFogg();
});
//also setup the text file display on Click to select file:
- $j( this.target_input_file_name ).unbind().attr('readonly', 'readonly').click(function(){
+ $j(this.target_input_file_name).unbind().attr('readonly', 'readonly').click(function(){
_this.selectFogg();
})
}
return ;
}
- //if they have the right version of mozilla provide install link:
+ //they have the right version of mozilla provide install link:
var os_link = false;
if(navigator.oscpu){
if(navigator.oscpu.search('Linux') >= 0)
}
//if rewriting form use upload msg text
var upMsg = (_this.form_rewrite) ? gM('fogg-for_improved_uplods') : '';
- $j( _this.target_please_install ).html( upMsg + gM('fogg-please_install',os_link )).css('padding', '10px').show();
+ $j(_this.target_please_install).html( upMsg + gM('fogg-please_install',os_link )).css('padding', '10px').show();
}
//setup the target save local file bindins:
$j( _this.target_btn_save_local_file ).unbind().click(function(){
//assume input target
setupForm: function(){
js_log('firefogg::setupForm::');
- //to parent form setup if we want http updates
+ //to parent form setup if we want http updates
if( this.form_rewrite ){
//do parent form setup:
this.pe_setupForm();
inTag+= '/><span id="' + $j(this.selector).attr('name') + '_fogg-control"></span>';
js_log('set input: ' + inTag);
- $j( this.selector ).replaceWith( inTag );
+ $j(this.selector).replaceWith(inTag);
this.target_input_file_name = 'input[name=' + $j(this.selector).attr('name') + ']';
//update the selector to the control target:
this.doControlBindings();
},
getEditForm:function(){
- if( this.target_edit_from ){
- return this.pe_getEditForm();
- }
js_log('get form: action=' + $j(this.selector).parents().find("form").attr('action'));
return $j(this.selector).parents().find("form").get(0);
},
getProgressTitle:function(){
js_log("fogg:getProgressTitle f:" + this.fogg_enabled + ' rw:' + this.form_rewrite);
//return the parent if we don't have fogg turned on:
- if(! this.fogg_enabled )
+ if(! this.fogg_enabled || !this.firefogg_form_action )
return this.pe_getProgressTitle();
if( !this.form_rewrite )
return gM('fogg-transcoding');
},
doUploadSwitch:function(){
var _this = this;
- js_log( "firefogg: doUploadSwitch:: " + this.fogg_enabled );
+ js_log("firefogg: doUploadSwitch:: " + this.fogg_enabled);
//make sure firefogg is enabled otherwise do parent UploadSwich:
if( !this.fogg_enabled || !this.firefogg_form_action )
return _this.pe_doUploadSwitch();
- //check what mode to use firefogg in:
+ //check what mode to use firefogg in:
if( _this.upload_mode == 'post' ){
_this.doEncode();
}else if( _this.upload_mode == 'api' && _this.chunks_supported){ //if api mode and chunks supported do chunkUpload
}
},
//doChunkUpload does both uploading and encoding at the same time and uploads one meg chunks as they are ready
- doChunkUpload : function(){
+ doChunkUpload : function(){
var _this = this;
_this.action_done = false;
'comment' : _this.formData['wpUploadDescription'],
'enablechunks': true
};
-
//check for editToken:
- if( !this.etoken )
+ if(!this.etoken)
this.etoken = _this.formData['wpEditToken'];
- if( this.etoken )
+ if(this.etoken)
aReq['token'] = this.etoken;
if( _this.formData['wpWatchthis'] )
aReq['watch'] = _this.formData['wpWatchthis'];
- if( _this.formData['wpIgnoreWarning'] )
+ if( _this.formData['wpIgnoreWarning'] )
aReq['ignorewarnings'] = _this.formData['wpIgnoreWarning'];
js_log('do fogg upload/encode call: '+ _this.api_url + ' :: ' + JSON.stringify( aReq ) );
},
//doEncode and monitor progress:
doEncode : function(){
- js_log('firefogg:doEncode');
var _this = this;
_this.action_done = false;
_this.dispProgressOverlay();
_this.updateProgressWin( gM('successfulupload'), gM( 'mv_upload_done', _this.fogg.resultUrl),buttons);
}else{
//done state with error? ..not really possible given how firefogg works
- js_log(" upload done, in chunks mode, but no resultUrl::" + response_text);
+ js_log(" upload done, in chunks mode, but no resultUrl!");
}
}
}else{
mvEmbed.init( swap_done_callback, force_id );
}
mvEmbed = {
+ //flist stores the set of functions to run after the video has been swaped in.
flist:new Array(),
init:function( swap_done_callback, force_id ){
+
if(swap_done_callback)
mvEmbed.flist.push( swap_done_callback );
+
//get mv_embed location if it has not been set
js_log('mv_embed ' + MV_EMBED_VERSION);
- var loadPlaylistLib=false;
- //set up the jQuery selector:
+ var loadPlaylistLib=false;
var eAction = function(this_elm){
js_log( "Do SWAP: " + $j(this_elm).attr("id") + ' tag: '+ this_elm.tagName.toLowerCase() );
getControls:function( embedObj ){
js_log('f:controlsBuilder:: opt:' + this.options);
this.id = (embedObj.pc)?embedObj.pc.pp.id:embedObj.id;
- this.avaliable_width=embedObj.playerPixelWidth();
+ this.available_width = embedObj.playerPixelWidth();
//make pointer to the embedObj
this.embedObj =embedObj;
var _this = this;
var o='';
for( var i in this.components ){
if( this.supports[i] ){
- if( this.avaliable_width > this.components[i].w ){
+ if( this.available_width > this.components[i].w ){
//special case with playhead don't add unless we have 60px
- if( i=='play_head' && ctrlBuilder.avaliable_width < 60 )
+ if( i == 'play_head' && ctrlBuilder.available_width < 60 )
continue;
o+=this.components[i].o();
- this.avaliable_width -= this.components[i].w;
+ this.available_width -= this.components[i].w;
}else{
- js_log('not enough space for control component:'+i);
+ js_log('not enough space for control component:' + i);
}
}
}
'play_head':{
'w':0, //special case (takes up remaining space)
'o':function(){
- return '<div class="play_head" id="mv_play_head_'+ctrlBuilder.id+'" style="width: ' + (ctrlBuilder.avaliable_width - 30) + 'px;"></div>';
+ return '<div class="play_head" id="mv_play_head_' + ctrlBuilder.id + '" style="width: ' + ( ctrlBuilder.available_width - 30 ) + 'px;"></div>';
}
}
}
//init the global Msg if not already
if(!gMsg){var gMsg={};}
-//laguage loader:
+
+//laguage msg loader:
function loadGM( msgSet ){
for(var i in msgSet){
gMsg[ i ] = msgSet[i];
* @path the path to the file (or set of files) with ending slash
* @gClasses the set of classes
* if an array $j.className become jquery.className.js
- * if an asssociative objec then key => value paris are used
+ * if an asssociative object then key => value paris are used
*/
if(typeof mvClassPaths == 'undefined')
mvClassPaths = {};
path = '';
if(gClasses.length){
//do array loop:
- for(var i=0; i<gClasses.length; i++){
+ for(var i=0; i < gClasses.length; i++){
if(typeof gClasses[i] != 'undefined'){
//setup normal replacement of j with jquery
var jsName = ( gClasses[i].substr(0,3) == '$j.' ) ? opt['j_replace'] + gClasses[i].substr(3) : gClasses[i];
//assume object with key:path:
mvClassPaths[i] = path + gClasses[ i ];
}
- }
- var cat = mvClassPaths;
+ }
}
function mvGetClassPath(k){
if( mvClassPaths[k] ){
*/
function mv_jqueryBindings(){
js_log('mv_jqueryBindings');
- (function($) {
-
+ (function($) {
$.fn.addMediaWiz = function( iObj, callback ){
//first set the cursor for the button to "loading"
$j(this.selector).css('cursor','wait').attr('title', gM('loading_title'));