r49683 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49682‎ | r49683 | r49684 >
Date:23:35, 20 April 2009
Author:dale
Status:deferred
Tags:
Comment:
fixed oggHandler rewrite (experimental)
Modified paths:
  • /trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js
@@ -274,7 +274,7 @@
275275 setTimeout( 'mvJsLoader.doLoad()', 25 );
276276 }
277277 }else{
278 - js_log('checkLoading passed for: do run callbacks');
 278+ //js_log('checkLoading passed for: do run callbacks');
279279 //only do callback if we are in the same instance (weird concurency issue)
280280 var cb_count=0;
281281 for(var i=0; i < this.callbacks.length; i++)
@@ -394,9 +394,11 @@
395395 //js_log(_this.id + ' plugin loaded');
396396 _this.loaded = true;
397397 //make sure we have not already cleared the callbacks:
398 - if(_this.loading_callbacks != null){
399 - for(var i=0; i < _this.loading_callbacks.length; i++ )
400 - _this.loading_callbacks[i]();
 398+ if( _this.loading_callbacks != null){
 399+ for(var i=0; i < _this.loading_callbacks.length; i++ ){
 400+ if(_this.loading_callbacks[i])
 401+ _this.loading_callbacks[i]();
 402+ }
401403 }
402404 _this.loading_callbacks = null;
403405
@@ -419,7 +421,7 @@
420422 var quicktimeMozillaPlayer = new mediaPlayer('quicktime-mozilla',['video/ogg'],'quicktime');
421423 var quicktimeActiveXPlayer = new mediaPlayer('quicktime-activex',['video/ogg'],'quicktime');
422424
423 -var htmlPlayer = new mediaPlayer('html',['text/html', 'image/jpeg', 'image/png'],'html');
 425+var htmlPlayer = new mediaPlayer('html',['text/html', 'image/jpeg', 'image/png', 'image/svg'], 'html');
424426
425427 /**
426428 * mediaPlayers is a collection of mediaPlayer objects supported by the client.
@@ -440,7 +442,8 @@
441443 {
442444 this.players = new Array();
443445 this.loadPreferences();
444 - //set up default players library mapping
 446+
 447+ //set up default players order for each library type
445448 this.default_players['video/x-flv'] = ['flash','vlc'];
446449 this.default_players['video/h264'] = ['flash', 'vlc'];
447450
@@ -477,7 +480,7 @@
478481 if(mime_type!=null)
479482 player.supported_types.push(mime_type);
480483
481 - this.players.push(player);
 484+ this.players.push( player );
482485 },
483486 getMIMETypePlayers : function(mime_type)
484487 {
@@ -532,7 +535,7 @@
533536 break;
534537 }
535538 }
536 - if(selected_player)
 539+ if( selected_player )
537540 {
538541 for(var i=0; i < global_player_list.length; i++)
539542 {
@@ -801,10 +804,11 @@
802805 var src = re.exec( $j('#'+vidId).html() )[2];
803806 //replace the top div with mv_embed based player:
804807 var vid_html = '<video id="vid_' + i +'" '+
805 - 'src="' + src + ' poster="' + poster + '" style="width:' + pwidth +
 808+ 'src="' + src + '" poster="' + poster + '" style="width:' + pwidth +
806809 'px;height:' + pheight + 'px;"></video>';
 810+ js_log("video html: " + vid_html);
807811 if( src && poster)
808 - $j('#'+vidId).replaceWidth( vid_html );
 812+ $j('#'+vidId).html( vid_html );
809813 //rewrite that video id:
810814 rewrite_by_id('vid_' + i);
811815 }

Status & tagging log