r89135 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89134‎ | r89135 | r89136 >
Date:20:41, 29 May 2011
Author:hartman
Status:deferred
Tags:
Comment:
A few more global var leaks and a couple of config name typos that we should squash, before it becomes very difficult.
Modified paths:
  • /trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/EmbedPlayer.config.php (modified) (history)
  • /trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/iframeApi/mw.IFramePlayerApiServer.js (modified) (history)
  • /trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/mw.MediaElement.js (modified) (history)
  • /trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/skins/mw.PlayerControlBuilder.js (modified) (history)
  • /trunk/extensions/TimedMediaHandler/MwEmbedModules/TimedText/resources/mw.TimedText.js (modified) (history)

Diff [purge]

Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/TimedText/resources/mw.TimedText.js
@@ -217,7 +217,7 @@
218218 return {
219219 'w': 28,
220220 'o': function( ctrlObj ) {
221 - $textButton = $( '<div />' )
 221+ var $textButton = $( '<div />' )
222222 .attr( 'title', gM( 'mwe-embedplayer-timed_text' ) )
223223 .addClass( "ui-state-default ui-corner-all ui-icon_link rButton timed-text" )
224224 .append(
@@ -531,7 +531,7 @@
532532 }
533533 },
534534 /**
535 - * Enalbe a source and update the currentLangKey
 535+ * Enable a source and update the currentLangKey
536536 * @param source
537537 * @return
538538 */
Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/EmbedPlayer.config.php
@@ -98,17 +98,17 @@
9999 'EmbedPlayer.MonitorRate' => 250,
100100
101101 // If the embedPlayer should accept arguments passed in from iframe postMessages calls
102 - 'EmbedPlayer.EnalbeIFramePlayerServer' => false,
 102+ 'EmbedPlayer.EnableIFramePlayerServer' => false,
103103
104104 // If embedPlayer should support server side temporal urls for seeking options are
105105 // flash|always|none default is support for flash only.
106106 'EmbedPlayer.EnableURLTimeEncoding' => 'flash',
107107
108108 // The domains which can read and send events to the video player
109 - 'EmbedPLayer.IFramePlayer.DomainWhiteList' => '*',
 109+ 'EmbedPlayer.IFramePlayer.DomainWhiteList' => '*',
110110
111111 // If the iframe should send and receive javascript events across domains via postMessage
112112 'EmbedPlayer.EnableIframeApi' => true,
113113
114114 );
115 -?>
\ No newline at end of file
 115+?>
Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/mw.MediaElement.js
@@ -167,7 +167,8 @@
168168 var _this = this;
169169 // Select the default source
170170 var playableSources = this.getPlayableSources();
171 - var flash_flag = ogg_flag = false;
 171+ var flash_flag, oggflag;
 172+ flash_flag = ogg_flag = false;
172173
173174 // Check if there are any playableSources
174175 if( playableSources.length == 0 ){
Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/skins/mw.PlayerControlBuilder.js
@@ -1009,7 +1009,7 @@
10101010 doVolumeBinding: function( ) {
10111011 var embedPlayer = this.embedPlayer;
10121012 var _this = this;
1013 - $volumeSlider = embedPlayer.$interface.find( '.volume-slider' );
 1013+ var $volumeSlider = embedPlayer.$interface.find( '.volume-slider' );
10141014 if( $volumeSlider.length == 0 ){
10151015 return false;
10161016 }
@@ -1841,7 +1841,7 @@
18421842 'w' : 36,
18431843 'o' : function( ctrlObj ) {
18441844 mw.log( 'PlayerControlBuilder::Set up volume control for: ' + ctrlObj.embedPlayer.id );
1845 - $volumeOut = $( '<span />' );
 1845+ var $volumeOut = $( '<span />' );
18461846 if ( ctrlObj.volume_layout == 'horizontal' ) {
18471847 $volumeOut.append(
18481848 $( '<div />' )
Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/iframeApi/mw.IFramePlayerApiServer.js
@@ -184,7 +184,7 @@
185185 },
186186
187187 /**
188 - * Check an origin domain against the configuration value: 'EmbedPLayer.IFramePlayer.DomainWhiteList'
 188+ * Check an origin domain against the configuration value: 'EmbedPlayer.IFramePlayer.DomainWhiteList'
189189 * Returns true if the origin domain is allowed to communicate with the embedPlayer
190190 * otherwise returns false.
191191 *
@@ -192,9 +192,9 @@
193193 * The origin domain to be checked
194194 */
195195 'eventDomainCheck': function( origin ){
196 - if( mw.getConfig( 'EmbedPLayer.IFramePlayer.DomainWhiteList' ) ){
 196+ if( mw.getConfig( 'EmbedPlayer.IFramePlayer.DomainWhiteList' ) ){
197197 // NOTE this is very similar to the apiProxy function:
198 - var domainWhiteList = mw.getConfig('EmbedPLayer.IFramePlayer.DomainWhiteList');
 198+ var domainWhiteList = mw.getConfig('EmbedPlayer.IFramePlayer.DomainWhiteList');
199199 if( domainWhiteList == '*' ){
200200 // The default very permissive state
201201 return true;

Status & tagging log