r82799 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82798‎ | r82799 | r82800 >
Date:16:20, 25 February 2011
Author:dale
Status:deferred
Tags:
Comment:
check for callbacks before running them
added 720P ogg derivative to default encoding set.
Modified paths:
  • /trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/MediaPlayer.js (modified) (history)
  • /trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js (modified) (history)
  • /trunk/extensions/TimedMediaHandler/MwEmbedModules/TimedText/resources/mw.TimedText.js (modified) (history)
  • /trunk/extensions/TimedMediaHandler/TimedMediaHandler.php (modified) (history)
  • /trunk/extensions/TimedMediaHandler/WebVideoTranscode/WebVideoTranscode.php (modified) (history)

Diff [purge]

Index: trunk/extensions/TimedMediaHandler/TimedMediaHandler.php
@@ -121,6 +121,9 @@
122122 // A standard web streamable ogg video
123123 WebVideoTranscode::ENC_OGV_6MBS,
124124
 125+ // High quality 720P ogg video:
 126+ WebVideoTranscode::ENC_OGV_HQ_VBR,
 127+
125128 // A standard web streamable WebM video
126129 WebVideoTranscode::ENC_WEBM_6MBS,
127130
Index: trunk/extensions/TimedMediaHandler/WebVideoTranscode/WebVideoTranscode.php
@@ -24,9 +24,8 @@
2525 * key constant. ( Or just run a maintenance script to delete all
2626 * the assets for a given profile )
2727 *
28 - * Msg keys for derivatives are the profile constant with underscores instead of .
29 - * 200_200kbs.ogv look up would be:
30 - * $messages['timedmedia-derivative-200_200kbs_ogv'] => 'Ogg 200';
 28+ * Msg keys for derivatives are set as follows:
 29+ * $messages['timedmedia-derivative-200_200kbs.ogv'] => 'Ogg 200';
3130 */
3231
3332 // Ogg Profiles
Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/TimedText/resources/mw.TimedText.js
@@ -427,7 +427,8 @@
428428
429429 // If there are inline sources don't check the api )
430430 if( this.textSources.length != 0 ){
431 - callback();
 431+ if( callback )
 432+ callback();
432433 return ;
433434 }
434435
@@ -464,7 +465,8 @@
465466 _this.textSources.push( source );
466467 }
467468 // All sources loaded run callback:
468 - callback();
 469+ if( callback )
 470+ callback();
469471 } );
470472 },
471473
@@ -1540,11 +1542,13 @@
15411543 if( ! sourcePages.query.allpages ) {
15421544 //Check if a shared asset
15431545 mw.log( 'no subtitle pages found');
1544 - callback();
 1546+ if( callback )
 1547+ callback();
15451548 return ;
15461549 }
15471550 // We have sources put them into the player
1548 - callback( _this.getSources( sourcePages ) );
 1551+ if( callback )
 1552+ callback( _this.getSources( sourcePages ) );
15491553 } );
15501554 },
15511555
Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js
@@ -139,7 +139,8 @@
140140 }
141141 })
142142 if( playersLoaded ){
143 - callback();
 143+ if( callback )
 144+ callback();
144145 }
145146 }
146147 /**
Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/MediaPlayer.js
@@ -68,7 +68,9 @@
6969 mw.load( [
7070 'mw.EmbedPlayer' + this.library.substr(0,1).toUpperCase() + this.library.substr(1)
7171 ], function() {
72 - callback();
 72+ if( callback ){
 73+ callback();
 74+ }
7375 } );
7476 }
7577 };

Status & tagging log