r38946 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r38945‎ | r38946 | r38947 >
Date:20:44, 8 August 2008
Author:stipe
Status:old
Tags:
Comment:
stream selection / download menus look better, order of players determined by hard-coded per mime-type list
Modified paths:
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/mv_embed.css (modified) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/mv_embed.js (modified) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/button_grey_left.png (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/button_grey_right.png (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/button_play.png (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/button_subscribe.png (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/button_to_clipboard.png (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/carousel_left.png (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/carousel_right.png (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/carousel_top_left.png (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/carousel_top_right.png (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/embed_arrow.png (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/flash_carousel.jpg (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/flash_player.jpg (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/ico_mail.png (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/ico_rss.png (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/img1.jpg (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/img2.jpg (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/logo.png (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/logo2.png (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/other_results_bg.png (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/other_results_top.png (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/other_results_top2.png (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/pelosi.jpg (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/person1.jpg (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/search_suggest_bg.png (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/search_suggest_bottom.png (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/search_suggest_top.png (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/selector.png (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/thumb1.jpg (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/thumb2.jpg (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/thumb3.jpg (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/thumb4.jpg (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/tracker.png (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/transparent_bg.png (added) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/styles.css (modified) (history)

Diff [purge]

Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/mv_embed.js
@@ -248,14 +248,15 @@
249249 {
250250 players : null,
251251 preference : null,
252 - default_players : null,
 252+ default_players : null,
253253 init : function()
254254 {
255255 this.players = new Array();
256256 this.loadPreferences();
257257 this.default_players = new Object();
258 - this.default_players['video/x-flv']= ['flowplayer','vlc'];
259 - this.default_players['video/annodex']=['cortado','vlc'];
 258+ this.default_players['video/x-flv']= ['flash','vlc'];
 259+ this.default_players['video/ogg']=['native','vlc','java'];
 260+ this.default_players['video/mp4']=['vlc'];
260261 },
261262 addPlayer : function(player, mime_type)
262263 {
@@ -277,10 +278,15 @@
278279 getMIMETypePlayers : function(mime_type)
279280 {
280281 var mime_players = new Array();
281 - for (var i in this.players)
282 - if (this.players[i].supportsMIMEType(mime_type))
283 - mime_players.push(this.players[i]);
284 -
 282+ // @@TODO: optimize this loop
 283+ if(this.default_players[mime_type])
 284+ for (var d in this.default_players[mime_type])
 285+ {
 286+ var library = this.default_players[mime_type][d];
 287+ for (var i in this.players)
 288+ if (this.players[i].library==library && this.players[i].supportsMIMEType(mime_type))
 289+ mime_players.push(this.players[i]);
 290+ }
285291 return mime_players;
286292 },
287293 defaultPlayer : function(mime_type)
@@ -292,12 +298,8 @@
293299 for(var i in mime_players)
294300 if(mime_players[i].id==this.preference[mime_type])
295301 return mime_players[i];
296 - // otherwise use the hard-coded preference list
297 - for(var d in this.default_players)
298 - for(var i in mime_players)
299 - if(mime_players[i].id==this.default_players[d])
300 - return mime_players[i];
301302 // otherwise just return the first compatible player
 303+ // (it will be chosen according to the default_players list
302304 return mime_players[0];
303305 }
304306 js_log('No default player found for ' + mime_type);
@@ -2010,8 +2012,8 @@
20112013 var retval = '<img src="'+image_src+'"/>';
20122014 if(is_not_selected)
20132015 retval+='<a href="#" onClick="' + source_select_code + 'embedTypes.players.userSelectPlayer(\''+default_player.id+'\',\''+source.getMIMEType()+'\'); return false;">';
2014 - retval += source.getTitle()+' - ' + default_player.getName() + (is_not_selected?'</a>':'') + ' ';
2015 - retval += '(<a href="#" onClick=\'$j("#player_select_list_'+index+'").fadeIn("slow");return false;\'>choose player</a>)' + player_code;
 2016+ retval += source.getTitle()+/*' - ' + default_player.getName() +*/ (is_not_selected?'</a>':'') + ' ';
 2017+ retval += /*'(<a href="#" onClick=\'$j("#player_select_list_'+index+'").fadeIn("slow");return false;\'>choose player</a>)' +*/ player_code;
20162018 return retval;
20172019 }
20182020 else
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/thumb3.jpg
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/thumb3.jpg
___________________________________________________________________
Added: svn:mime-type
20192021 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/thumb4.jpg
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/thumb4.jpg
___________________________________________________________________
Added: svn:mime-type
20202022 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/button_play.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/button_play.png
___________________________________________________________________
Added: svn:mime-type
20212023 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/carousel_top_left.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/carousel_top_left.png
___________________________________________________________________
Added: svn:mime-type
20222024 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/carousel_right.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/carousel_right.png
___________________________________________________________________
Added: svn:mime-type
20232025 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/button_subscribe.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/button_subscribe.png
___________________________________________________________________
Added: svn:mime-type
20242026 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/ico_mail.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/ico_mail.png
___________________________________________________________________
Added: svn:mime-type
20252027 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/search_suggest_bg.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/search_suggest_bg.png
___________________________________________________________________
Added: svn:mime-type
20262028 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/selector.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/selector.png
___________________________________________________________________
Added: svn:mime-type
20272029 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/person1.jpg
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/person1.jpg
___________________________________________________________________
Added: svn:mime-type
20282030 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/other_results_top.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/other_results_top.png
___________________________________________________________________
Added: svn:mime-type
20292031 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/embed_arrow.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/embed_arrow.png
___________________________________________________________________
Added: svn:mime-type
20302032 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/flash_carousel.jpg
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/flash_carousel.jpg
___________________________________________________________________
Added: svn:mime-type
20312033 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/carousel_left.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/carousel_left.png
___________________________________________________________________
Added: svn:mime-type
20322034 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/button_to_clipboard.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/button_to_clipboard.png
___________________________________________________________________
Added: svn:mime-type
20332035 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/button_grey_right.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/button_grey_right.png
___________________________________________________________________
Added: svn:mime-type
20342036 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/logo.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/logo.png
___________________________________________________________________
Added: svn:mime-type
20352037 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/ico_rss.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/ico_rss.png
___________________________________________________________________
Added: svn:mime-type
20362038 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/flash_player.jpg
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/flash_player.jpg
___________________________________________________________________
Added: svn:mime-type
20372039 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/other_results_top2.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/other_results_top2.png
___________________________________________________________________
Added: svn:mime-type
20382040 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/transparent_bg.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/transparent_bg.png
___________________________________________________________________
Added: svn:mime-type
20392041 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/other_results_bg.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/other_results_bg.png
___________________________________________________________________
Added: svn:mime-type
20402042 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/button_grey_left.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/button_grey_left.png
___________________________________________________________________
Added: svn:mime-type
20412043 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/logo2.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/logo2.png
___________________________________________________________________
Added: svn:mime-type
20422044 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/pelosi.jpg
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/pelosi.jpg
___________________________________________________________________
Added: svn:mime-type
20432045 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/search_suggest_top.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/search_suggest_top.png
___________________________________________________________________
Added: svn:mime-type
20442046 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/img1.jpg
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/img1.jpg
___________________________________________________________________
Added: svn:mime-type
20452047 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/search_suggest_bottom.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/search_suggest_bottom.png
___________________________________________________________________
Added: svn:mime-type
20462048 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/img2.jpg
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/img2.jpg
___________________________________________________________________
Added: svn:mime-type
20472049 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/tracker.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/tracker.png
___________________________________________________________________
Added: svn:mime-type
20482050 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/carousel_top_right.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/carousel_top_right.png
___________________________________________________________________
Added: svn:mime-type
20492051 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/thumb1.jpg
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/thumb1.jpg
___________________________________________________________________
Added: svn:mime-type
20502052 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/thumb2.jpg
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/images/thumb2.jpg
___________________________________________________________________
Added: svn:mime-type
20512053 + application/octet-stream
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/skin/styles.css
@@ -314,22 +314,25 @@
315315 left:0px;
316316 z-index: 10;
317317 overflow: hidden;
 318+}
 319+
318320 /* margin: -305px 0 0 0; */
319 -}
320321 .videoComplete .videoOptionsComplete {
321322 background: url(images/player_video_options_bg.png) 0 0 no-repeat;
322323 width: 266px;
323324 height: 172px;
324325 margin: 5px auto;
325326 padding: 12px 19px;
326 - font-size: 14px;
 327+/* font-size: 14px;*/
 328+ font-size:10pt;
327329 overflow: auto;
328330 color: #7a7a7a;
329331 }
330332 .videoComplete .videoOptionsComplete p {text-align: center; margin: 3px 0; padding: 0;}
331333 .videoComplete .videoOptionsComplete a {
332334 color: white;
333 - font-size: 22px;
 335+/* font-size: 22px;*/
 336+ font-size:12px;
334337 text-decoration: none;
335338 }
336339 .videoComplete .videoOptionsComplete a.email {background: url(images/ico_mail.png) right 0px no-repeat; padding: 0 50px 0 0;}
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/mv_embed.css
@@ -5,8 +5,9 @@
66 .player_select_list {
77 color:white;
88 font-size:10pt;
9 - display:none;
 9+/* display:none;*/
1010 }
 11+
1112 .player_select_list a:visited {
1213 color:white;
1314 }

Status & tagging log