r52878 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52877‎ | r52878 | r52879 >
Date:00:26, 8 July 2009
Author:dale
Status:deferred
Tags:
Comment:
cleanup of recommending firefox for any case where you have ogg video
Modified paths:
  • /branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js (modified) (history)

Diff [purge]

Index: branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js
@@ -1276,16 +1276,21 @@
12771277 return false;
12781278 }
12791279 }
1280 - //see if we are using a fallback (in which case it does not matter)
 1280+ //see if we are using mv_embed without a ogg source in which case no point in promoting firefox :P
12811281 if(this.media_element && this.media_element.sources){
 1282+ var foundOgg = false;
12821283 var playable_sources = this.media_element.getPlayableSources();
12831284 for(var sInx=0; sInx < playable_sources.length; sInx++){
12841285 var mime_type = playable_sources[sInx].mime_type;
1285 - if( mime_type=='video/h264' || mime_type=='video/x-flv'){
 1286+ if( mime_type=='video/ogg' ){
12861287 //they have flash / h.264 fallback no need to push firefox :(
1287 - return false;
 1288+ foundOgg = true;
12881289 }
1289 - }
 1290+ }
 1291+ //no ogg no point in download firefox :(
 1292+ if(!foundOgg)
 1293+ return false;
 1294+
12901295 }
12911296 }
12921297 return true;

Status & tagging log