Index: trunk/extensions/MwEmbedSupport/MwEmbedModules/MwEmbedSupport/jquery/jquery.mwEmbedUtil.js |
— | — | @@ -8,13 +8,11 @@ |
9 | 9 | * Extend Unique to work with strings and number values |
10 | 10 | * http://paulirish.com/2010/duck-punching-with-jquery/ |
11 | 11 | */ |
12 | | - var _old = $.unique; |
13 | | - |
| 12 | + var _oldUnique = $.unique; |
14 | 13 | $.unique = function(arr){ |
15 | | - |
16 | | - // do the default behavior only if we got an array of elements |
| 14 | + // Do the default behavior only if we got an array of elements |
17 | 15 | if (!!arr[0].nodeType){ |
18 | | - return _old.apply(this,arguments); |
| 16 | + return _oldUnique.apply(this,arguments); |
19 | 17 | } else { |
20 | 18 | // reduce the array to contain no dupes via grep/inArray |
21 | 19 | return $.grep(arr,function(v,k){ |
Index: trunk/extensions/MwEmbedSupport/MwEmbedModules/MwEmbedSupport/mwEmbedSupport.js |
— | — | @@ -119,13 +119,22 @@ |
120 | 120 | }); |
121 | 121 | return ; |
122 | 122 | } |
123 | | - if( !mediaWiki.config.get( name )){ |
| 123 | + var existingValue = mediaWiki.config.get( name ); |
| 124 | + if( !existingValue || typeof existingValue == 'string'){ |
124 | 125 | mw.setConfig( name, value ); |
125 | 126 | return ; |
126 | 127 | } |
127 | 128 | if( typeof mediaWiki.config.get( name ) == 'object' ){ |
128 | | - mw.setConfig( name, $.extend( mediaWiki.config.get( name ), value ) ); |
129 | | - } |
| 129 | + if( $.isArray( existingValue) && $.isArray( value ) ){ |
| 130 | + for( var i =0; i < value.length ; i ++ ){ |
| 131 | + existingValue.push( value[i] ); |
| 132 | + } |
| 133 | + mw.setConfig( name, $.unique( existingValue ) ); |
| 134 | + } else { |
| 135 | + mw.setConfig( name, $.extend( {}, existingValue, value) ); |
| 136 | + } |
| 137 | + return ; |
| 138 | + } |
130 | 139 | }; |
131 | 140 | |
132 | 141 | /** |
Index: trunk/extensions/TimedMediaHandler/TimedMediaTransformOutput.php |
— | — | @@ -171,7 +171,7 @@ |
172 | 172 | |
173 | 173 | if( $data['query'] && $data['query']['allpages'] ){ |
174 | 174 | foreach( $data['query']['allpages'] as $na => $page ){ |
175 | | - $pageTitle = Title::newFromText( $page['title'] ) ; |
| 175 | + $subTitle = Title::newFromText( $page['title'] ) ; |
176 | 176 | $tileParts = explode( '.', $page['title'] ); |
177 | 177 | if( count( $tileParts) >= 3 ){ |
178 | 178 | $subtitle_extension = array_pop( $tileParts ); |
— | — | @@ -185,11 +185,11 @@ |
186 | 186 | } |
187 | 187 | $this->textTracks[] = array( |
188 | 188 | 'kind' => 'subtitles', |
189 | | - 'data-mwtitle' => $pageTitle->getNsText() . ':' . $pageTitle->getDBkey(), |
| 189 | + 'data-mwtitle' => $subTitle->getNsText() . ':' . $subTitle->getDBkey(), |
190 | 190 | 'type' => 'text/mw-srt', |
191 | 191 | // TODO Should add a special entry point and output proper WebVTT format: |
192 | 192 | // http://www.whatwg.org/specs/web-apps/current-work/webvtt.html |
193 | | - 'src' => $pageTitle->getFullURL( array( |
| 193 | + 'src' => $subTitle->getFullURL( array( |
194 | 194 | 'action' => 'raw', |
195 | 195 | 'ctype' => 'text/plain' |
196 | 196 | )), |
Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/players/mw.EmbedPlayer.js |
— | — | @@ -518,7 +518,6 @@ |
519 | 519 | } |
520 | 520 | |
521 | 521 | var sourceAttr = mw.getConfig( 'EmbedPlayer.SourceAttributes' ); |
522 | | - |
523 | 522 | for ( var i = 0; i < sourceAttr.length; i++ ) { // array loop: |
524 | 523 | var attr = sourceAttr[ i ]; |
525 | 524 | var attr_value = element.getAttribute( attr ); |
Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/EmbedPlayer.i18n.php |
— | — | @@ -70,9 +70,10 @@ |
71 | 71 | 'mwe-embedplayer-buffering' => 'buffering', |
72 | 72 | 'mwe-embedplayer-copy-code' => 'Copy code', |
73 | 73 | 'mwe-embedplayer-video-h264' => 'H.264 video', |
| 74 | + 'mwe-embedplayer-video-webm' => 'WebM video', |
74 | 75 | 'mwe-embedplayer-video-flv' => 'Flash video', |
75 | 76 | 'mwe-embedplayer-video-ogg' => 'Ogg video', |
76 | | - 'mwe-embedplayer-video-audio' => 'Ogg audio', |
| 77 | + 'mwe-embedplayer-video-audio' => 'Ogg audio', |
77 | 78 | 'mwe-embedplayer-missing-source' => 'No source video was found', |
78 | 79 | ); |
79 | 80 | |