r52825 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52824‎ | r52825 | r52826 >
Date:01:12, 7 July 2009
Author:dale
Status:deferred
Tags:
Comment:
added getfirefox link / warning.
Modified paths:
  • /branches/new-upload/phase3/js2/mwEmbed/libAddMedia/mvFirefogg.js (modified) (history)
  • /branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js (modified) (history)

Diff [purge]

Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/mvFirefogg.js
@@ -10,7 +10,7 @@
1111 "fogg-installed" : "Firefogg is Installed",
1212 "fogg-for_improved_uplods" : "For Improved uploads: ",
1313 "fogg-please_install" : "<a href=\"$1\">Install Firefogg</a>. More <a href=\"http://commons.wikimedia.org/wiki/Commons:Firefogg\">about firefogg</a>",
14 - "fogg-use_latest_fox" : "Please first install <a href=\"http://www.mozilla.com/en-US/firefox/all-beta.html\">Firefox 3.5</a>. <i>then revisit this page to install the <b>firefogg</b> extention</i>",
 14+ "fogg-use_latest_fox" : "Please first install <a href=\"http://www.mozilla.com/en-US/firefox/upgrade.html?from=mv_embed\">Firefox 3.5</a>. <i>then revisit this page to install the <b>firefogg</b> extention</i>",
1515 "fogg-passthrough_mode" : "Your selected file is already ogg or not a video file",
1616 "fogg-transcoding" : "Encoding Video to Ogg",
1717 "fogg-encoding-done" : "Encoding Done"
Index: branches/new-upload/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js
@@ -38,7 +38,10 @@
3939 "mv_ogg-player-flowplayer" : "Flowplayer",
4040 "mv_ogg-player-selected" : " (selected)",
4141 "mv_ogg-player-omtkplayer" : "OMTK Flash Vorbis",
42 - "mv_generic_missing_plugin" : "You browser does not appear to support playback type: <b>$1</b><br> visit the <a href=\"http://commons.wikimedia.org/wiki/Commons:Media_help\">Playback Methods</a> page to download a player<br>"
 42+ "mv_generic_missing_plugin" : "You browser does not appear to support playback type: <b>$1</b><br> visit the <a href=\"http://commons.wikimedia.org/wiki/Commons:Media_help\">Playback Methods</a> page to download a player<br>",
 43+
 44+ "mv_for_best_experience": "For best video playback experience we recomend <a href=\"http://www.mozilla.com/en-US/firefox/upgrade.html?from=mv_embed\">Firefox 3.5</a><br><input type=\"checkbox\">Do not warn me again."
 45+
4346 });
4447
4548 var default_video_attributes = {
@@ -314,13 +317,44 @@
315318 //add play hook:
316319 $j('#mv_play_pause_button_' + embedObj.id).unbind().btnBind().click(function(){
317320 $j('#' + embedObj.id).get(0).play();
318 - });
 321+ })
319322
320323 //big_play_link_ play binding:
321324 $j('#big_play_link_' + embedObj.id).unbind().click(function(){
322325 $j('#' + embedObj.id).get(0).play();
323326 });
324327
 328+ //add recomend firefox if non-native playback:
 329+ var doGetFFWarning = true;
 330+ for(var i in embedObj.media_players){
 331+ if(embedObj.media_players[i].id == 'videoElement'){
 332+ doGetFFWarning=false;
 333+ }
 334+ }
 335+ for(var source=0; source < playable_sources.length; source++){
 336+ var mime_type =playable_sources[source].mime_type;
 337+ if( mime_type=='video/h264' || mime_type=='video/x-flv'){
 338+ //they have flash / h.264 fallback no need to push firefox :(
 339+ doGetFFWarning = false;
 340+ }
 341+ }
 342+ if(doGetFFWarning){
 343+ $j('#dc_'+ embedObj.id).hover(
 344+ function(){
 345+ if($j('gnp_' + embedObj.id).length==0){
 346+ $j(this).append('<div id="gnp_' + embedObj.id + '" class="ui-state-highlight ui-corner-all" ' +
 347+ 'style="position:absolute;display:none;background:#FFF;top:10px;left:10px;right:10px;height:60px;">' +
 348+ gM('mv_for_best_experience') +
 349+ '</div>');
 350+ }
 351+ $j('#gnp_' + embedObj.id).fadeIn('slow');
 352+ },
 353+ function(){
 354+ $j('#gnp_' + embedObj.id).fadeOut('slow');
 355+ }
 356+ );
 357+ }
 358+
325359 if( $j.browser.msie && $j.browser.version <= 6){
326360 $j('#big_play_link_' + embedObj.id).pngFix();
327361 }

Status & tagging log